Skip to content

Commit

Permalink
Move remnants of ocs api requests to v2 endpoint
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Apr 9, 2021
1 parent 4d39077 commit dcb20f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions apps/files/src/components/TransferOwnershipDialogue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export default {

this.loadingUsers = true
try {
const response = await axios.get(generateOcsUrl('apps/files_sharing/api/v1') + 'sharees', {
const response = await axios.get(generateOcsUrl('apps/files_sharing/api/v1', 2) + 'sharees', {
params: {
format: 'json',
itemType: 'file',
Expand All @@ -172,7 +172,7 @@ export default {
},
})

if (response.data.ocs.meta.statuscode !== 100) {
if (response.data.ocs.meta.statuscode !== 200) {
logger.error('Error fetching suggestions', { response })
}

Expand Down
8 changes: 4 additions & 4 deletions apps/files_sharing/src/components/SharingInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export default {
shareType.push(this.SHARE_TYPES.SHARE_TYPE_EMAIL)
}

const request = await axios.get(generateOcsUrl('apps/files_sharing/api/v1') + 'sharees', {
const request = await axios.get(generateOcsUrl('apps/files_sharing/api/v1', 2) + 'sharees', {
params: {
format: 'json',
itemType: this.fileInfo.type === 'dir' ? 'folder' : 'file',
Expand All @@ -208,7 +208,7 @@ export default {
},
})

if (request.data.ocs.meta.statuscode !== 100) {
if (request.data.ocs.meta.statuscode !== 200) {
console.error('Error fetching suggestions', request)
return
}
Expand Down Expand Up @@ -287,14 +287,14 @@ export default {
async getRecommendations() {
this.loading = true

const request = await axios.get(generateOcsUrl('apps/files_sharing/api/v1') + 'sharees_recommended', {
const request = await axios.get(generateOcsUrl('apps/files_sharing/api/v1', 2) + 'sharees_recommended', {
params: {
format: 'json',
itemType: this.fileInfo.type,
},
})

if (request.data.ocs.meta.statuscode !== 100) {
if (request.data.ocs.meta.statuscode !== 200) {
console.error('Error fetching recommendations', request)
return
}
Expand Down

0 comments on commit dcb20f4

Please sign in to comment.