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 <hamzamahjoubi221@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
  • Loading branch information
hamza221 authored and nextcloud-command committed Jun 7, 2024
1 parent 25fff59 commit dd504d1
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 44 deletions.
2 changes: 1 addition & 1 deletion js/index-BahqIHTU.mjs.map

Large diffs are not rendered by default.

76 changes: 35 additions & 41 deletions js/viewer-main.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/viewer-main.mjs.map

Large diffs are not rendered by default.

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 dd504d1

Please sign in to comment.