feat(lst): added icons to the sidebar

This commit is contained in:
2025-02-20 10:25:35 -06:00
parent 54b1b6081a
commit 604fdf1545
9 changed files with 291 additions and 52 deletions

View File

@@ -3,7 +3,7 @@ import {verify} from "hono/jwt";
const session = new OpenAPIHono();
const tags = ["Auth"];
const JWT_SECRET = "your-secret-key";
const JWT_SECRET = process.env.JWT_SECRET;
const route = createRoute({
tags: ["Auth"],
@@ -21,6 +21,14 @@ const route = createRoute({
},
description: "Login successful",
},
401: {
content: {
"application/json": {
schema: {message: ""},
},
},
description: "Error of why you were not logged in.",
},
},
});
session.openapi(route, async (c) => {
@@ -39,7 +47,7 @@ session.openapi(route, async (c) => {
try {
const payload = await verify(token, JWT_SECRET);
console.log(payload);
//console.log(payload);
return c.json({data: {token, user: payload.user}});
} catch (err) {
return c.json({error: "Invalid or expired token"}, 401);