Added optional API key auth to REST API. Returning HTTP status codes from GraphQL API.
This commit is contained in:
@@ -271,11 +271,11 @@ export async function removeStash(stashId, sessionUser) {
|
||||
.delete()
|
||||
.returning('*');
|
||||
|
||||
if (removed === 0) {
|
||||
throw new HttpError('Unable to remove this stash', 400);
|
||||
if (!removed) {
|
||||
throw new HttpError('This stash could not be removed', 409);
|
||||
}
|
||||
|
||||
return curateStash(stash);
|
||||
return curateStash(removed);
|
||||
}
|
||||
|
||||
export async function stashActor(actorId, stashId, sessionUser) {
|
||||
|
||||
Reference in New Issue
Block a user