mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
Merge pull request #54625 from nextcloud/fix/files_sharing/reject-pending-remote-share
This commit is contained in:
commit
a23c087737
3 changed files with 17 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
4
dist/files_sharing-init.js
vendored
4
dist/files_sharing-init.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_sharing-init.js.map
vendored
2
dist/files_sharing-init.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue