mirror of
https://github.com/BradNut/boredgame
synced 2025-09-08 17:40:22 +00:00
10 lines
270 B
TypeScript
10 lines
270 B
TypeScript
|
|
import { Hono } from 'hono';
|
||
|
|
import { requireAuth } from "../middleware/auth.middleware";
|
||
|
|
|
||
|
|
const users = new Hono().get('/me', requireAuth, async (c) => {
|
||
|
|
const user = c.var.user;
|
||
|
|
return c.json({ user });
|
||
|
|
});
|
||
|
|
|
||
|
|
export default users;
|
||
|
|
export type UsersType = typeof users
|