Separated stash create dialog component.

This commit is contained in:
2024-08-04 23:40:25 +02:00
parent 164f91eabd
commit d370b35490
8 changed files with 110 additions and 66 deletions

View File

@@ -146,7 +146,9 @@ export async function createStash(newStash, sessionUser) {
.insert(curateStashEntry(newStash, sessionUser))
.returning('*');
return curateStash(stash);
const curatedStash = curateStash(stash);
return curatedStash;
} catch (error) {
if (error.routine === '_bt_check_unique') {
throw new HttpError('Stash name should be unique', 409);