From 443c643fa95ce9c278a7da99f3821e9134596d07 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Tue, 17 Dec 2024 10:32:22 +0100 Subject: [PATCH] fix: use new enpoint for view event --- .../Pages/ViewEvent/Notes/viewEventNotes.actions.js | 4 ++-- .../components/Pages/ViewEvent/Notes/viewEventNotes.epics.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core_modules/capture-core/components/Pages/ViewEvent/Notes/viewEventNotes.actions.js b/src/core_modules/capture-core/components/Pages/ViewEvent/Notes/viewEventNotes.actions.js index 5a42d5c775..2b08cd9bc0 100644 --- a/src/core_modules/capture-core/components/Pages/ViewEvent/Notes/viewEventNotes.actions.js +++ b/src/core_modules/capture-core/components/Pages/ViewEvent/Notes/viewEventNotes.actions.js @@ -25,11 +25,11 @@ export const updateEventNoteField = (value: string) => export const requestSaveEventNote = (note: string) => actionCreator(actionTypes.REQUEST_SAVE_EVENT_NOTE)({ note }); -export const startSaveEventNote = (eventId: string, serverData: Object, selections: Object, clientId: string) => +export const startSaveEventNote = (eventUid: string, serverData: Object, selections: Object, clientId: string) => actionCreator(actionTypes.START_SAVE_EVENT_NOTE)({ selections, clientId }, { offline: { effect: { - url: `events/${eventId}/note`, + url: `/tracker/events/${eventUid}/note`, method: effectMethods.POST, data: serverData, }, diff --git a/src/core_modules/capture-core/components/Pages/ViewEvent/Notes/viewEventNotes.epics.js b/src/core_modules/capture-core/components/Pages/ViewEvent/Notes/viewEventNotes.epics.js index 820f9a4065..1f32b9cb76 100644 --- a/src/core_modules/capture-core/components/Pages/ViewEvent/Notes/viewEventNotes.epics.js +++ b/src/core_modules/capture-core/components/Pages/ViewEvent/Notes/viewEventNotes.epics.js @@ -64,7 +64,7 @@ export const addNoteForViewEventEpic = (action$: InputObservable, store: ReduxSt const clientId = uuid(); const serverData = { event: eventId, - notes: [{ value: payload.note }], + value: payload.note, }; const clientNote = {