Skip to content
File

Blob: worker/src/server/routes/access.ts

typescript12 lines
1import { Hono } from 'hono';
2import { loginSchema } from '@/shared/contracts/signaling.ts';
3import { login } from '@/server/auth.ts';
4import type { HttpApp } from '@/server/http.ts';
5import { input, result, room } from './context.ts';
6 
7const app = new Hono<HttpApp>();
8app.post('/login', async (c) => login((await input(c, loginSchema)).password, c));
9app.get('/status', async (c) => result(c, await room(c).getStatus()));
10 
11export default app;