Merge pull request #54635 from nextcloud/backport/54625/stable31

This commit is contained in:
Kate 2025-08-26 11:04:36 +02:00 committed by GitHub
commit 3cc15e38ad
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