From e1b5941096fbb23bacf76ae895ae62753c289c34 Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 12 Apr 2022 21:01:48 +0200 Subject: [PATCH] Fix accept/reject remote share action This is the fix for the described problem in https://github.com/nextcloud/server/issues/31301 Signed-off-by: MSe1969 Signed-off-by: szaimen --- apps/files_sharing/js/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/files_sharing/js/app.js b/apps/files_sharing/js/app.js index dc03e31bf8085..24416fd5a3f74 100644 --- a/apps/files_sharing/js/app.js +++ b/apps/files_sharing/js/app.js @@ -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)