diff options
author | Joas Schilling <coding@schilljs.com> | 2023-08-18 12:52:16 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-08-18 12:52:16 +0200 |
commit | bf2a9aa46d886d9032f1c6f2e95e44aa97f30525 (patch) | |
tree | 2c77933b48f70fc16346fa3e159b45ed6200dd37 /apps/files_reminders | |
parent | c7035eec05d40ec595135691cb00a25b452d655c (diff) | |
download | nextcloud-server-bf2a9aa46d886d9032f1c6f2e95e44aa97f30525.tar.gz nextcloud-server-bf2a9aa46d886d9032f1c6f2e95e44aa97f30525.zip |
fix(CS): Use the naming pattern for the URL scheme
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files_reminders')
-rw-r--r-- | apps/files_reminders/appinfo/routes.php | 6 | ||||
-rw-r--r-- | apps/files_reminders/src/services/reminderService.ts | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_reminders/appinfo/routes.php b/apps/files_reminders/appinfo/routes.php index 8dfd785669b..7f022a280ab 100644 --- a/apps/files_reminders/appinfo/routes.php +++ b/apps/files_reminders/appinfo/routes.php @@ -30,8 +30,8 @@ $requirements = [ return [ 'ocs' => [ - ['name' => 'Api#get', 'url' => '/api/v{version}/get/{fileId}', 'verb' => 'GET', 'requirements' => $requirements], - ['name' => 'Api#set', 'url' => '/api/v{version}/set/{fileId}', 'verb' => 'PUT', 'requirements' => $requirements], - ['name' => 'Api#remove', 'url' => '/api/v{version}/remove/{fileId}', 'verb' => 'DELETE', 'requirements' => $requirements], + ['name' => 'Api#get', 'url' => '/api/v{version}/{fileId}', 'verb' => 'GET', 'requirements' => $requirements], + ['name' => 'Api#set', 'url' => '/api/v{version}/{fileId}', 'verb' => 'PUT', 'requirements' => $requirements], + ['name' => 'Api#remove', 'url' => '/api/v{version}/{fileId}', 'verb' => 'DELETE', 'requirements' => $requirements], ], ]; diff --git a/apps/files_reminders/src/services/reminderService.ts b/apps/files_reminders/src/services/reminderService.ts index eacb6e2834e..06163b601cb 100644 --- a/apps/files_reminders/src/services/reminderService.ts +++ b/apps/files_reminders/src/services/reminderService.ts @@ -28,7 +28,7 @@ interface Reminder { } export const getReminder = async (fileId: number): Promise<Reminder> => { - const url = generateOcsUrl('/apps/files_reminders/api/v1/get/{fileId}', { fileId }) + const url = generateOcsUrl('/apps/files_reminders/api/v1/{fileId}', { fileId }) const response = await axios.get(url) const dueDate = response.data.ocs.data.dueDate ? new Date(response.data.ocs.data.dueDate) : null @@ -38,7 +38,7 @@ export const getReminder = async (fileId: number): Promise<Reminder> => { } export const setReminder = async (fileId: number, dueDate: Date): Promise<[]> => { - const url = generateOcsUrl('/apps/files_reminders/api/v1/set/{fileId}', { fileId }) + const url = generateOcsUrl('/apps/files_reminders/api/v1/{fileId}', { fileId }) const response = await axios.put(url, { dueDate: dueDate.toISOString(), // timezone of string is always UTC @@ -48,7 +48,7 @@ export const setReminder = async (fileId: number, dueDate: Date): Promise<[]> => } export const clearReminder = async (fileId: number): Promise<[]> => { - const url = generateOcsUrl('/apps/files_reminders/api/v1/remove/{fileId}', { fileId }) + const url = generateOcsUrl('/apps/files_reminders/api/v1/{fileId}', { fileId }) const response = await axios.delete(url) return response.data.ocs.data |