12 lines
263 B
TypeScript
12 lines
263 B
TypeScript
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";
|
|
})
|
|
)
|