jwt middleware

This commit is contained in:
2025-12-14 15:15:14 +11:00
parent 61b00555cc
commit 98abf54a23
6 changed files with 62 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
import { Elysia } from "elysia";
import { authGuard, jwtConfig } from "../auth/index";
export const protectedApi = new Elysia()
.use(jwtConfig)
.guard(authGuard, (router) =>
router
.get("/secret", () => {
return "hehe secret";
})
)