File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -101,8 +101,15 @@ module.exports = function (router, protector) {
101101 var result = await GstoreHelper . delete ( req . params . account , gstorePath ) ;
102102
103103 if ( ! result . isSuccess ) {
104- res . status ( result . error . status ) . send ( `Failed to delete artifact <${ artifactUri } >: ${ result . error . message } ` ) ;
105- return ;
104+
105+ gstorePath = `${ req . params . group } /${ req . params . artifact } /artifact.jsonld` ;
106+ result = await GstoreHelper . delete ( req . params . account , gstorePath ) ;
107+
108+ if ( ! result . isSuccess ) {
109+ res . status ( result . error . status ) . send ( `Failed to delete artifact <${ artifactUri } >: ${ result . error . message } ` ) ;
110+ return ;
111+ }
112+
106113 }
107114
108115 res . status ( 204 ) . send ( `The artifact <${ artifactUri } > has been deleted.` ) ;
Original file line number Diff line number Diff line change @@ -99,8 +99,15 @@ module.exports = function (router, protector) {
9999 var result = await GstoreHelper . delete ( req . params . account , gstorePath ) ;
100100
101101 if ( ! result . isSuccess ) {
102- res . status ( 500 ) . send ( `Internal database error. Failed to delete the group <${ groupUri } >.` ) ;
103- return ;
102+
103+ gstorePath = `${ req . params . group } /group.jsonld` ;
104+ result = await GstoreHelper . delete ( req . params . account , gstorePath ) ;
105+
106+ if ( ! result . isSuccess ) {
107+ res . status ( 500 ) . send ( `Internal database error. Failed to delete the group <${ groupUri } >.` ) ;
108+ return ;
109+ }
110+
104111 }
105112
106113 res . status ( 204 ) . send ( `The group <${ groupUri } > has been deleted.` ) ;
You can’t perform that action at this time.
0 commit comments