1.1.0 #29

Merged
Xominus merged 25 commits from discord into main 2026-08-22 18:00:22 +00:00
Showing only changes of commit c5f6c25563 - Show all commits
+6 -4
View File
@@ -80,7 +80,6 @@ export const app = new Elysia()
/^https?:\/\/([a-z0-9-]+\.)?bladeandbrawn\.com$/i,
// testing
/^https?:\/\/([a-z0-9-]+\.)?bladeandbrawn\.webflow\.io$/i,
/^https?:\/\/([a-z0-9-]+\.)?bladeandbrawn-test\.webflow\.io$/i,
// development
"http://localhost:5173",
],
@@ -261,7 +260,7 @@ export const app = new Elysia()
}),
})
// Authenticated
.guard({ authAdmin: true })
.guard({ authAdmin: true }, (app) => app
.get("/standards/config", async () => {
return await s.Calculator.Standards.Config.get();
})
@@ -271,6 +270,7 @@ export const app = new Elysia()
body: t.Object({ standardsConfigId: t.String() })
})
)
)
.group("/standards", { authAdmin: true }, (app) => app
.post("/configs", async ({ body: { name, datasetId, params } }) => {
return await s.Standards.Configs.create(name, datasetId, params);
@@ -457,13 +457,14 @@ export const app = new Elysia()
}, {
params: t.Object({ id: t.String() })
})
.guard({ authUser: true })
.guard({ authUser: true }, (app) => app
.get("/me/stats", async ({ accountId }) => {
const stats = await s.Accounts.stats(accountId);
if (!stats) throw new NotFoundError("Account stats not found");
return stats;
})
.guard({ authAdmin: true })
)
.guard({ authAdmin: true }, (app) => app
.get("/:id", async ({ params: { id } }) => {
const account = await s.Accounts.get(id);
if (!account) throw new NotFoundError("Account not found");
@@ -472,6 +473,7 @@ export const app = new Elysia()
params: t.Object({ id: t.String() })
})
)
)
// WEBHOOKS
.post("/webhooks/printful", async ({ body, query }) => {