Skip to content

Commit

Permalink
Fix: Add missing generateUrl
Browse files Browse the repository at this point in the history
Signed-off-by: Hamza Mahjoubi <[email protected]>

Signed-off-by: nextcloud-command <[email protected]>

[skip ci]
  • Loading branch information
hamza221 authored and backportbot[bot] committed Jun 7, 2024
1 parent cb7c4b1 commit 2d96a2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/services/FileSortingConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import axios from '@nextcloud/axios'
import { isPublic } from '../utils/davUtils'
import { generateUrl } from '@nextcloud/router'

/**
* @return {object}
Expand All @@ -47,7 +48,8 @@ async function getViewConfigs() {
if (isPublic()) {
return null
}
return await axios.get('/apps/files/api/v1/views')
const url = generateUrl('apps/files/api/v1/views')
return await axios.get(url)
.then((response) => {
return response.data.data?.files
})
Expand Down

0 comments on commit 2d96a2d

Please sign in to comment.