diff options
Diffstat (limited to 'apps/files_sharing/src')
-rw-r--r-- | apps/files_sharing/src/components/SharingInput.vue | 4 | ||||
-rw-r--r-- | apps/files_sharing/src/mixins/ShareRequests.js | 2 | ||||
-rw-r--r-- | apps/files_sharing/src/views/SharingInherited.vue | 4 | ||||
-rw-r--r-- | apps/files_sharing/src/views/SharingTab.vue | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_sharing/src/components/SharingInput.vue b/apps/files_sharing/src/components/SharingInput.vue index d5d7a701bf5..9bc4e04e722 100644 --- a/apps/files_sharing/src/components/SharingInput.vue +++ b/apps/files_sharing/src/components/SharingInput.vue @@ -199,7 +199,7 @@ export default { let request = null try { - request = await axios.get(generateOcsUrl('apps/files_sharing/api/v1', 2) + 'sharees', { + request = await axios.get(generateOcsUrl('apps/files_sharing/api/v1/sharees'), { params: { format: 'json', itemType: this.fileInfo.type === 'dir' ? 'folder' : 'file', @@ -290,7 +290,7 @@ export default { let request = null try { - request = await axios.get(generateOcsUrl('apps/files_sharing/api/v1', 2) + 'sharees_recommended', { + request = await axios.get(generateOcsUrl('apps/files_sharing/api/v1/sharees_recommended'), { params: { format: 'json', itemType: this.fileInfo.type, diff --git a/apps/files_sharing/src/mixins/ShareRequests.js b/apps/files_sharing/src/mixins/ShareRequests.js index 394567b829c..ef45f9171b2 100644 --- a/apps/files_sharing/src/mixins/ShareRequests.js +++ b/apps/files_sharing/src/mixins/ShareRequests.js @@ -30,7 +30,7 @@ import { generateOcsUrl } from '@nextcloud/router' import axios from '@nextcloud/axios' import Share from '../models/Share' -const shareUrl = generateOcsUrl('apps/files_sharing/api/v1', 2) + 'shares' +const shareUrl = generateOcsUrl('apps/files_sharing/api/v1/shares') const headers = { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', } diff --git a/apps/files_sharing/src/views/SharingInherited.vue b/apps/files_sharing/src/views/SharingInherited.vue index 000710a50d0..1911e05579f 100644 --- a/apps/files_sharing/src/views/SharingInherited.vue +++ b/apps/files_sharing/src/views/SharingInherited.vue @@ -128,8 +128,8 @@ export default { async fetchInheritedShares() { this.loading = true try { - const url = generateOcsUrl(`apps/files_sharing/api/v1/shares/inherited?format=json&path=${encodeURIComponent(this.fullPath)}`, 2) - const shares = await axios.get(url.replace(/\/$/, '')) + const url = generateOcsUrl('apps/files_sharing/api/v1/shares/inherited?format=json&path={path}', { path: this.fullPath }) + const shares = await axios.get(url) this.shares = shares.data.ocs.data .map(share => new Share(share)) .sort((a, b) => b.createdTime - a.createdTime) diff --git a/apps/files_sharing/src/views/SharingTab.vue b/apps/files_sharing/src/views/SharingTab.vue index a7f71d27aca..e08ce261522 100644 --- a/apps/files_sharing/src/views/SharingTab.vue +++ b/apps/files_sharing/src/views/SharingTab.vue @@ -175,7 +175,7 @@ export default { this.loading = true // init params - const shareUrl = generateOcsUrl('apps/files_sharing/api/v1', 2) + 'shares' + const shareUrl = generateOcsUrl('apps/files_sharing/api/v1/shares') const format = 'json' // TODO: replace with proper getFUllpath implementation of our own FileInfo model const path = (this.fileInfo.path + '/' + this.fileInfo.name).replace('//', '/') |