(#16) Редактирование лекции
Some checks failed
Some checks failed
This commit is contained in:
@@ -78,6 +78,14 @@ export const api = createApi({
|
||||
}),
|
||||
invalidatesTags: ['LessonList'],
|
||||
}),
|
||||
updateLesson: builder.mutation<BaseResponse<Lesson>, Partial<Lesson> & Pick<Lesson, '_id'>>({
|
||||
query: (data) => ({
|
||||
method: 'PUT',
|
||||
url: `/lesson/${data._id}`,
|
||||
body: data,
|
||||
}),
|
||||
invalidatesTags: ['LessonList'],
|
||||
}),
|
||||
deleteLesson: builder.mutation<null, string>({
|
||||
query: (lessonId) => ({
|
||||
url: `/lesson/${lessonId}`,
|
||||
|
||||
Reference in New Issue
Block a user