Skip to content

Commit

Permalink
fix(api): /course/:id -> /courses/:id
Browse files Browse the repository at this point in the history
  • Loading branch information
jsun969 committed Sep 25, 2024
1 parent 95e6ba6 commit 01e4c52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/apis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ export const getCourses = async (params: { year: number; term: string }) => {
};

export const getCourse = async ({ id }: { id: string }) => {
return fetcher.get<Course>(`course/${id}`).json();
return fetcher.get<Course>(`courses/${id}`).json();
};
2 changes: 1 addition & 1 deletion src/mocks/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const handlers = [
],
});
}),
http.get('/api/course/:id', async ({ params }) => {
http.get('/api/courses/:id', async ({ params }) => {
const { id } = params as { id: CourseId };
if (
id === CourseId.ERROR1 ||
Expand Down

0 comments on commit 01e4c52

Please sign in to comment.