(#16) fix put lesson api call
This commit is contained in:
parent
2087666991
commit
3d7e7a1783
@ -81,7 +81,7 @@ export const api = createApi({
|
||||
updateLesson: builder.mutation<BaseResponse<Lesson>, Partial<Lesson> & Pick<Lesson, '_id'>>({
|
||||
query: (data) => ({
|
||||
method: 'PUT',
|
||||
url: `/lesson/${data._id}`,
|
||||
url: '/lesson',
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ['LessonList'],
|
||||
|
@ -49,7 +49,7 @@ router.delete('/lesson/:lessonId', (req, res) => {
|
||||
res.send({ success: true, body: { ok: true }})
|
||||
})
|
||||
|
||||
router.put('/lesson/:lessonId', (req, res) => {
|
||||
router.put('/lesson', (req, res) => {
|
||||
res.send({ success: true, body: req.body })
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user