diff --git a/apps/files/appinfo/routes.php b/apps/files/appinfo/routes.php index 8d1a33d6b4cd0..a3c6836366e6a 100644 --- a/apps/files/appinfo/routes.php +++ b/apps/files/appinfo/routes.php @@ -60,6 +60,11 @@ 'url' => '/api/v1/views/{view}/{key}', 'verb' => 'PUT' ], + [ + 'name' => 'Api#setViewConfig', + 'url' => '/api/v1/views/{key}', + 'verb' => 'PUT' + ], [ 'name' => 'Api#getViewConfigs', 'url' => '/api/v1/views', diff --git a/apps/files/src/store/viewConfig.ts b/apps/files/src/store/viewConfig.ts index f3021077c5466..6b87b974d2864 100644 --- a/apps/files/src/store/viewConfig.ts +++ b/apps/files/src/store/viewConfig.ts @@ -44,9 +44,10 @@ export const useViewConfigStore = function(...args) { * @param value */ async update(view: ViewId, key: string, value: string | number | boolean) { - axios.put(generateUrl(`/apps/files/api/v1/views/${view}/${key}`), { + const params = new URLSearchParams({ view }) + axios.put(generateUrl(`/apps/files/api/v1/views/${key}`), { value, - }) + }, { params }) emit('files:viewconfig:updated', { view, key, value }) },