Skip to content

Commit 6db329f

Browse files
committed
fix: 학습하기 api url 수정
1 parent fa0142f commit 6db329f

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

src/app/learning/page.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ const LearningPage = async () => {
77
const accessToken = cookieStore.get('access_token')?.value;
88

99
const headers: HeadersInit = {
10-
'Content-Type': 'application/json',
10+
'Content-Type': 'application/json'
1111
};
12-
12+
1313
if (accessToken) {
1414
headers['Authorization'] = `Bearer ${accessToken}`;
1515
}
1616

17-
const response = await fetch('http://43.200.90.72/contents/overview', {
17+
const response = await fetch('https://moaguide.n-e.kr/contents/overview', {
1818
method: 'GET',
1919
headers,
20-
cache: 'no-store',
20+
cache: 'no-store'
2121
});
2222

2323
if (!response.ok) {
@@ -28,11 +28,11 @@ const LearningPage = async () => {
2828
const initialData = await response.json();
2929

3030
return (
31-
<div className='min-h-[calc(100dvh-135.5px)] flex flex-col'>
31+
<div className="min-h-[calc(100dvh-135.5px)] flex flex-col">
3232
<Navbar />
3333
<LearningPageClient initialData={initialData} />
3434
</div>
3535
);
3636
};
3737

38-
export default LearningPage;
38+
export default LearningPage;

src/app/mypage/bookmark/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const BookmarkPage = async ({
2121

2222
try {
2323
const productBookmarkResponse = await fetch(
24-
`https://api.moaguide.com/summary/list?category=${category}&subcategory=bookmark&sort=bookmark&page=${pages}&size=10`,
24+
`https://moaguide.n-e.kr/summary/list?category=${category}&subcategory=bookmark&sort=bookmark&page=${pages}&size=10`,
2525
{
2626
headers: {
2727
Authorization: `Bearer ${token}`

src/app/practice/[id]/page.tsx

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import PracticeDetailIndex from '@/components/practice/PracticeDetailIndex';
32
import type { ArticleItem } from '@/types/homeComponentsType';
43
import React from 'react';
@@ -10,9 +9,12 @@ interface PracticeDetailPageProps {
109
}
1110

1211
const PracticeDetailPage = async ({ params }: PracticeDetailPageProps) => {
13-
const response = await fetch(`https://api.moaguide.com/study/detail/article/${params.id}`, {
14-
cache: 'no-store'
15-
});
12+
const response = await fetch(
13+
`https://moaguide.n-e.kr/study/detail/article/${params.id}`,
14+
{
15+
cache: 'no-store'
16+
}
17+
);
1618

1719
if (!response.ok) {
1820
throw new Error('Failed to fetch data');
@@ -23,4 +25,4 @@ const PracticeDetailPage = async ({ params }: PracticeDetailPageProps) => {
2325
return <PracticeDetailIndex data={data} />;
2426
};
2527

26-
export default PracticeDetailPage;
28+
export default PracticeDetailPage;

0 commit comments

Comments
 (0)