Merge pull request #31949 from nextcloud/backport/31910/stable23

[stable23] Fix accept/reject remote share action
This commit is contained in:
blizzz 2022-04-14 13:53:20 +02:00 committed by GitHub
commit e2f137c2db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -303,7 +303,7 @@ OCA.Sharing.App = {
if (context.$file.attr('data-remote-id')) {
shareBase = 'remote_shares/pending'
}
$.post(OC.linkToOCS('apps/files_sharing/api/v1/shares/pending', 2) + shareId)
$.post(OC.linkToOCS('apps/files_sharing/api/v1/' + shareBase, 2) + shareId)
.success(function(result) {
context.fileList.remove(context.fileInfoModel.attributes.name)
}).fail(function() {
@ -330,11 +330,11 @@ OCA.Sharing.App = {
const shareId = context.$file.data('shareId')
let shareBase = 'shares'
if (context.$file.attr('data-remote-id')) {
shareBase = 'remote_shares/pending'
shareBase = 'remote_shares'
}
$.ajax({
url: OC.linkToOCS('apps/files_sharing/api/v1/shares', 2) + shareId,
url: OC.linkToOCS('apps/files_sharing/api/v1/' + shareBase, 2) + shareId,
type: 'DELETE',
}).success(function(result) {
context.fileList.remove(context.fileInfoModel.attributes.name)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long