Skip to content

Commit

Permalink
Fix accept/reject remote share action
Browse files Browse the repository at this point in the history
This is the fix for the described problem in
#31301

Signed-off-by: MSe1969 <[email protected]>
Signed-off-by: szaimen <[email protected]>
  • Loading branch information
szaimen authored and artonge committed Apr 14, 2022
1 parent 69262f8 commit efab17b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/files_sharing/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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)
Expand Down

0 comments on commit efab17b

Please sign in to comment.