aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2024-07-30 18:19:55 -0700
committerChristopher Ng <chrng8@gmail.com>2024-08-01 09:17:36 -0700
commit855a45650e608ff797b5ae38a7f18fa24a474f3f (patch)
tree924596e93e3ef1df86679e38ab5ca322561ed356 /apps/files
parentaa4d82d428c7125cd1286047e7531a62ce72af6d (diff)
downloadnextcloud-server-855a45650e608ff797b5ae38a7f18fa24a474f3f.tar.gz
nextcloud-server-855a45650e608ff797b5ae38a7f18fa24a474f3f.zip
feat(files): Support setting view config for complex ids
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/files')
-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 })