resourceSet: fix deletion.

This commit is contained in:
Julien Fontanet 2016-02-17 15:01:12 +01:00
parent c2d4423720
commit 1aedf9bb07

View File

@ -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
throw error
})
if (await store.has(id)) {
return store.del(id)
}
throw new NoSuchResourceSet(id)
}
async updateResourceSet (id, { name, subjects, objects }) {