More bugfixes

This commit is contained in:
Dominic Ferrando
2026-10-04 01:30:46 -04:00
parent daaf779562
commit 6e9ce94d46
4 changed files with 16 additions and 3 deletions
+2
View File
@@ -25,8 +25,10 @@ const StandardsController = new Elysia({ prefix: "/standards" })
params: t.Object({ id: BigIntIdSchema })
})
.put("/", async ({ params: { id }, body: { name, datasetId, params: parameters } }) => {
// Active config is not allowed to be edited
const activeConfig = await s.Calculator.Standards.Config.get();
if (activeConfig.id === id) throw new ConflictError("Cannot edit the active standards config");
const updated = await s.Standards.Configs.update(id, name, datasetId, parameters);
if (!updated) throw new NotFoundError("Standards config not found");
}, {