hidden subtree is now built as "predictable" to avoid duplicating it in sync

This commit is contained in:
zadam
2022-12-27 14:44:28 +01:00
parent ecc2ed7d73
commit 0758c82983
13 changed files with 169 additions and 69 deletions

View File

@@ -35,15 +35,14 @@ function register(router) {
existing.save();
return res.status(200).json(mappers.mapBranchToPojo(existing));
}
} else {
try {
const branch = new Branch(params).save();
try {
const branch = new Branch(params).save();
res.status(201).json(mappers.mapBranchToPojo(branch));
}
catch (e) {
throw new eu.EtapiError(400, eu.GENERIC_CODE, e.message);
res.status(201).json(mappers.mapBranchToPojo(branch));
} catch (e) {
throw new eu.EtapiError(400, eu.GENERIC_CODE, e.message);
}
}
});