Added optional API key auth to REST API. Returning HTTP status codes from GraphQL API.

This commit is contained in:
2025-03-31 23:01:29 +02:00
parent 73569704a5
commit 7dc1f78c80
4 changed files with 19 additions and 6 deletions

View File

@@ -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) {