Merge pull request #54625 from nextcloud/fix/files_sharing/reject-pending-remote-share

This commit is contained in:
Kate 2025-08-25 17:34:54 +02:00 committed by GitHub
commit a23c087737
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 7 deletions

View file

@ -41,10 +41,20 @@ export const action = new FileAction({
async exec(node: Node) {
try {
const isRemote = !!node.attributes.remote
const url = generateOcsUrl('apps/files_sharing/api/v1/{shareBase}/{id}', {
shareBase: isRemote ? 'remote_shares' : 'shares',
id: node.attributes.id,
})
const shareBase = isRemote ? 'remote_shares' : 'shares'
const id = node.attributes.id
let url: string
if (node.attributes.accepted === 0) {
url = generateOcsUrl('apps/files_sharing/api/v1/{shareBase}/pending/{id}', {
shareBase,
id,
})
} else {
url = generateOcsUrl('apps/files_sharing/api/v1/{shareBase}/{id}', {
shareBase,
id,
})
}
await axios.delete(url)
// Remove from current view

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long