resourceSet: fix deletion.
This commit is contained in:
parent
c2d4423720
commit
1aedf9bb07
@ -52,14 +52,14 @@ export default class {
|
||||
return set
|
||||
}
|
||||
|
||||
deleteResourceSet (id) {
|
||||
return this._store.get(id).catch(error => {
|
||||
if (error.notFound) {
|
||||
throw new NoSuchResourceSet(id)
|
||||
async deleteResourceSet (id) {
|
||||
const store = this._store
|
||||
|
||||
if (await store.has(id)) {
|
||||
return store.del(id)
|
||||
}
|
||||
|
||||
throw error
|
||||
})
|
||||
throw new NoSuchResourceSet(id)
|
||||
}
|
||||
|
||||
async updateResourceSet (id, { name, subjects, objects }) {
|
||||
|
Loading…
Reference in New Issue
Block a user