More refactoring and integration of standards dataset database
This commit is contained in:
@@ -116,16 +116,16 @@ export const app = new Elysia()
|
||||
if (!token || !token.sessionId) throw status(401, "Unauthorized");
|
||||
return { sessionId: token.sessionId.toString() };
|
||||
})
|
||||
.put("/config/:id", async ({ params: { id }, body: { standardsConfig } }) => {
|
||||
await calculatorService.standards.setConfig(id, standardsConfig);
|
||||
.put("/config/:id", async ({ params: { id }, body: { datasetId, parameters } }) => {
|
||||
await calculatorService.standards.setConfig(id, datasetId, parameters);
|
||||
}, {
|
||||
params: t.Object({ id: t.String() }),
|
||||
body: t.Object({ standardsConfig: StandardsParametersSchema })
|
||||
body: t.Object({ datasetId: t.String(), parameters: StandardsParametersSchema })
|
||||
})
|
||||
.post("/config", async ({ body: { standardsConfig } }) => {
|
||||
await calculatorService.standards.createConfig(standardsConfig);
|
||||
.post("/config", async ({ body: { datasetId, parameters } }) => {
|
||||
await calculatorService.standards.createConfig(datasetId, parameters);
|
||||
}, {
|
||||
body: t.Object({ standardsConfig: StandardsParametersSchema })
|
||||
body: t.Object({ datasetId: t.String(), parameters: StandardsParametersSchema })
|
||||
})
|
||||
.post("/config/:id/select", async ({ params: { id } }) => {
|
||||
await calculatorService.standards.selectConfig(id);
|
||||
|
||||
Reference in New Issue
Block a user