diff --git a/app/src/handlers/login.tsx b/app/src/handlers/login.tsx
index 291179a..0698a44 100644
--- a/app/src/handlers/login.tsx
+++ b/app/src/handlers/login.tsx
@@ -5,7 +5,8 @@ import { LoginPage } from '../frontend/pages/login';
const LoginHandler = new Hono();
LoginHandler.get('/login', async (c: Context) => {
- return c.html();
+ const errors = c.get('login-errors');
+ return c.html();
});
LoginHandler.post('/login', async (c: Context) => {
@@ -21,7 +22,7 @@ LoginHandler.post('/login', async (c: Context) => {
}
}
- c.set('login-errors', {});
+ c.set('login-errors', { error: { message: "Bad credentials" }});
return c.redirect('/login');
});
diff --git a/app/src/index.tsx b/app/src/index.tsx
index ea8f232..92f16be 100644
--- a/app/src/index.tsx
+++ b/app/src/index.tsx
@@ -12,6 +12,6 @@ app.get('/', async (c) => {
});
// Handlers
-app.route('/*', LoginHandler);
+app.route('', LoginHandler);
export default app;