feat(files): Support setting view config for complex ids

Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
Christopher Ng 2024-07-30 18:19:55 -07:00
parent aa4d82d428
commit 855a45650e
2 changed files with 8 additions and 1 deletions

View file

@ -60,6 +60,11 @@ $application->registerRoutes(
'url' => '/api/v1/views/{view}/{key}',
'verb' => 'PUT'
],
[
'name' => 'Api#setViewConfig',
'url' => '/api/v1/views',
'verb' => 'PUT'
],
[
'name' => 'Api#getViewConfigs',
'url' => '/api/v1/views',

View file

@ -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 })