summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2023-08-02 19:15:00 -0700
committerAndy Scherzinger <info@andy-scherzinger.de>2023-08-10 12:28:19 +0200
commitec4d660377a4e9099f3a5e0ba8d803a1b22535c8 (patch)
tree8f5b579d16f0534b0aa86daabcee940609541481
parentc25ed870d8537a6b2d64f84c21a4eb4196be9c55 (diff)
downloadnextcloud-server-ec4d660377a4e9099f3a5e0ba8d803a1b22535c8.tar.gz
nextcloud-server-ec4d660377a4e9099f3a5e0ba8d803a1b22535c8.zip
fix: frontend ocs
Signed-off-by: Christopher Ng <chrng8@gmail.com> (cherry picked from commit 00da82aa47db093703cc1fde95b1163cef1518c0)
-rw-r--r--apps/files_reminders/src/services/reminderService.ts6
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
}