Compare commits

...

2 Commits

Author SHA1 Message Date
177f1b3f5b 2.1.1
All checks were successful
platform/bro/pipeline/head This commit looks good
2024-04-02 16:27:28 +03:00
3d7e7a1783 (#16) fix put lesson api call 2024-04-02 16:27:22 +03:00
4 changed files with 5 additions and 5 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "journal.pl", "name": "journal.pl",
"version": "2.1.0", "version": "2.1.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "journal.pl", "name": "journal.pl",
"version": "2.1.0", "version": "2.1.1",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@chakra-ui/icons": "^2.1.1", "@chakra-ui/icons": "^2.1.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "journal.pl", "name": "journal.pl",
"version": "2.1.0", "version": "2.1.1",
"description": "inno-js platform journal ui repo", "description": "inno-js platform journal ui repo",
"main": "./src/index.tsx", "main": "./src/index.tsx",
"scripts": { "scripts": {

View File

@ -81,7 +81,7 @@ export const api = createApi({
updateLesson: builder.mutation<BaseResponse<Lesson>, Partial<Lesson> & Pick<Lesson, '_id'>>({ updateLesson: builder.mutation<BaseResponse<Lesson>, Partial<Lesson> & Pick<Lesson, '_id'>>({
query: (data) => ({ query: (data) => ({
method: 'PUT', method: 'PUT',
url: `/lesson/${data._id}`, url: '/lesson',
body: data, body: data,
}), }),
invalidatesTags: ['LessonList'], invalidatesTags: ['LessonList'],

View File

@ -49,7 +49,7 @@ router.delete('/lesson/:lessonId', (req, res) => {
res.send({ success: true, body: { ok: true }}) 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 }) res.send({ success: true, body: req.body })
}) })