File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
apps/files_sharing/src/actions Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -41,10 +41,20 @@ export const action = new FileAction({
4141 async exec ( node : Node ) {
4242 try {
4343 const isRemote = ! ! node . attributes . remote
44- const url = generateOcsUrl ( 'apps/files_sharing/api/v1/{shareBase}/{id}' , {
45- shareBase : isRemote ? 'remote_shares' : 'shares' ,
46- id : node . attributes . id ,
47- } )
44+ const shareBase = isRemote ? 'remote_shares' : 'shares'
45+ const id = node . attributes . id
46+ let url : string
47+ if ( node . attributes . accepted === 0 ) {
48+ url = generateOcsUrl ( 'apps/files_sharing/api/v1/{shareBase}/pending/{id}' , {
49+ shareBase,
50+ id,
51+ } )
52+ } else {
53+ url = generateOcsUrl ( 'apps/files_sharing/api/v1/{shareBase}/{id}' , {
54+ shareBase,
55+ id,
56+ } )
57+ }
4858 await axios . delete ( url )
4959
5060 // Remove from current view
You can’t perform that action at this time.
0 commit comments