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