Implement basic auth on portal
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
PlayerSchema,
|
||||
} from "@blade-and-brawn/domain"
|
||||
import { cors } from "@elysiajs/cors";
|
||||
import { Elysia, NotFoundError, status } from "elysia";
|
||||
import { Elysia, NotFoundError, status, t } from "elysia";
|
||||
import {
|
||||
PrintfulClient,
|
||||
PrintfulError,
|
||||
@@ -133,6 +133,9 @@ export const app = new Elysia()
|
||||
// TODO: protect with api key/token
|
||||
.group("/products", (app) =>
|
||||
app
|
||||
.onBeforeHandle(({ }) => {
|
||||
// authenticate cookie
|
||||
})
|
||||
.group("/sync", (app) =>
|
||||
app
|
||||
// Sync status
|
||||
@@ -163,7 +166,7 @@ export const app = new Elysia()
|
||||
return { printfulProduct, webflowProduct };
|
||||
}, {
|
||||
params: z.object({ printfulProductId: z.coerce.number() })
|
||||
}),
|
||||
})
|
||||
)
|
||||
|
||||
// WEBHOOKS
|
||||
|
||||
Reference in New Issue
Block a user