aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/appinfo/routes.php5
-rw-r--r--apps/files/src/store/viewConfig.ts4
2 files changed, 8 insertions, 1 deletions
diff --git a/apps/files/appinfo/routes.php b/apps/files/appinfo/routes.php
index 8d1a33d6b4c..487f6335d45 100644
--- a/apps/files/appinfo/routes.php
+++ b/apps/files/appinfo/routes.php
@@ -61,6 +61,11 @@ $application->registerRoutes(
'verb' => 'PUT'
],
[
+ 'name' => 'Api#setViewConfig',
+ 'url' => '/api/v1/views',
+ 'verb' => 'PUT'
+ ],
+ [
'name' => 'Api#getViewConfigs',
'url' => '/api/v1/views',
'verb' => 'GET'
diff --git a/apps/files/src/store/viewConfig.ts b/apps/files/src/store/viewConfig.ts
index f3021077c54..4dc40ba1015 100644
--- a/apps/files/src/store/viewConfig.ts
+++ b/apps/files/src/store/viewConfig.ts
@@ -44,8 +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}`), {
+ axios.put(generateUrl('/apps/files/api/v1/views'), {
value,
+ view,
+ key,
})
emit('files:viewconfig:updated', { view, key, value })