Skip to content

Commit

Permalink
Merge pull request #99 from Devminjeong-eum/hotfix/trending
Browse files Browse the repository at this point in the history
fix: /ranking/current api issue로 트렌딩 임시 주소 변경
  • Loading branch information
nyoung113 authored Jun 30, 2024
2 parents 556bfcf + ff164b5 commit bc56aa5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/fetcher/server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { serverFetch } from '@/fetcher/serverFetch.ts';
import { DefaultRes, FetchRes, TrendWordData, UserData } from '@/fetcher/types.ts';
import {
DefaultRes,
FetchRes,
TrendWordData,
UserData,
} from '@/fetcher/types.ts';
import { MainItemType, PaginationRes } from '@/types/main.ts';
import { notFound } from 'next/navigation';

Expand Down Expand Up @@ -28,10 +33,10 @@ export const getUserInfoServer = async () => {
export const getCurrentWeekTrendList = async () => {
try {
return await serverFetch<FetchRes<DefaultRes<TrendWordData>>>(
`/ranking/current`,
`ranking/week?year=2024&week=25`,
);
} catch (e) {
console.log('error', e);
notFound();
}
}
};

0 comments on commit bc56aa5

Please sign in to comment.