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 skjnldsv committed Jun 7, 2024
1 parent 102c5f6 commit 4898f0f
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 37 deletions.
70 changes: 35 additions & 35 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 4898f0f

Please sign in to comment.