feat(frontend): finished login form with validation

This commit is contained in:
2025-02-21 09:16:07 -06:00
parent d939332499
commit 9719451580
25 changed files with 551 additions and 230 deletions

View File

@@ -10,7 +10,6 @@ import scalar from "./route/scalar";
// services
import {ocmeService} from "./services/ocme/ocmeServer";
console.log(process.env.JWT_SECRET);
const app = new OpenAPIHono();
app.use("*", logger());
@@ -52,8 +51,8 @@ routes.forEach((route) => {
// return c.json({success: true, message: "is authenticated"});
// });
app.get("*", serveStatic({root: "../frontend/dist"}));
app.get("*", serveStatic({path: "../frontend/dist/index.html"}));
app.get("*", serveStatic({root: "./frontend/dist"}));
app.get("*", serveStatic({path: "./frontend/dist/index.html"}));
export default app;

View File

@@ -63,6 +63,8 @@ const route = createRoute({
app.openapi(route, async (c) => {
let body: {username: string; password: string};
console.log(`Trying to login`);
try {
body = await c.req.json();
} catch (error) {

View File

@@ -1,7 +0,0 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist"
},
"include": ["src", "index.ts"]
}