We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 729a91e commit da163fbCopy full SHA for da163fb
api/src/api/notes.js
@@ -279,7 +279,7 @@ router.put(
279
return res.status(200).json({
280
success: true,
281
message: 'Note successfully updated',
282
- data: updatedNote,
+ result: updatedNote,
283
});
284
} else {
285
return res.status(404).json({
client/src/pages/Note.jsx
@@ -293,7 +293,7 @@ const Note = ({ user }: NoteProps): Node => {
293
.then((res) => {
294
setSubmitState(SUBMIT_STATE.success);
295
setIsFetching(false);
296
- history.push(`/notes/${res.data.data._id}`);
+ history.push(`/notes/${res.data.result._id}`);
297
return res;
298
})
299
.catch(() => setSubmitState(SUBMIT_STATE.error));
0 commit comments