diff options
author | Christopher Ng <chrng8@gmail.com> | 2023-08-02 19:15:00 -0700 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2023-08-09 10:41:17 -0700 |
commit | 00da82aa47db093703cc1fde95b1163cef1518c0 (patch) | |
tree | f297bb2500c7e4b6f64b136a066d26e0b4cd69a4 /apps/files_reminders/src | |
parent | efed517976e3bcf8d27255a965585f5997913373 (diff) | |
download | nextcloud-server-00da82aa47db093703cc1fde95b1163cef1518c0.tar.gz nextcloud-server-00da82aa47db093703cc1fde95b1163cef1518c0.zip |
fix: frontend ocs
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/files_reminders/src')
-rw-r--r-- | apps/files_reminders/src/services/reminderService.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_reminders/src/services/reminderService.ts b/apps/files_reminders/src/services/reminderService.ts index bcfa09e2b78..eacb6e2834e 100644 --- a/apps/files_reminders/src/services/reminderService.ts +++ b/apps/files_reminders/src/services/reminderService.ts @@ -30,7 +30,7 @@ interface Reminder { export const getReminder = async (fileId: number): Promise<Reminder> => { const url = generateOcsUrl('/apps/files_reminders/api/v1/get/{fileId}', { fileId }) const response = await axios.get(url) - const dueDate = response.data.dueDate ? new Date(response.data.dueDate) : null + const dueDate = response.data.ocs.data.dueDate ? new Date(response.data.ocs.data.dueDate) : null return { dueDate, @@ -44,12 +44,12 @@ export const setReminder = async (fileId: number, dueDate: Date): Promise<[]> => dueDate: dueDate.toISOString(), // timezone of string is always UTC }) - return response.data + return response.data.ocs.data } export const clearReminder = async (fileId: number): Promise<[]> => { const url = generateOcsUrl('/apps/files_reminders/api/v1/remove/{fileId}', { fileId }) const response = await axios.delete(url) - return response.data + return response.data.ocs.data } |