Skip to content

Commit ae79878

Browse files
committed
fix upstream issue with course with course runs return type changing
1 parent aeeecd5 commit ae79878

File tree

1 file changed

+5
-4
lines changed
  • frontends/api/src/mitxonline/hooks/courses

1 file changed

+5
-4
lines changed

frontends/api/src/mitxonline/hooks/courses/queries.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { queryOptions } from "@tanstack/react-query"
22
import type {
33
CoursesApiApiV2CoursesListRequest,
4-
PaginatedV2CourseWithCourseRunsList,
4+
PaginatedCourseWithCourseRunsSerializerV2List,
55
} from "@mitodl/mitxonline-api-axios/v2"
66
import { coursesApi } from "../../clients"
77

@@ -18,9 +18,10 @@ const coursesQueries = {
1818
coursesList: (opts?: CoursesApiApiV2CoursesListRequest) =>
1919
queryOptions({
2020
queryKey: coursesKeys.coursesList(opts),
21-
queryFn: async (): Promise<PaginatedV2CourseWithCourseRunsList> => {
22-
return coursesApi.apiV2CoursesList(opts).then((res) => res.data)
23-
},
21+
queryFn:
22+
async (): Promise<PaginatedCourseWithCourseRunsSerializerV2List> => {
23+
return coursesApi.apiV2CoursesList(opts).then((res) => res.data)
24+
},
2425
}),
2526
}
2627

0 commit comments

Comments
 (0)