File
Blob: src/worker/api/private/me.ts
| 1 | import { GetMeResponse } from "@/contracts"; |
| 2 | import type { AppContext } from "@/worker/hono"; |
| 3 | import { serializeUserSummary } from "@/worker/presentation/serializers"; |
| 4 | |
| 5 | export const handleGetMe = async (c: AppContext): Promise<Response> => { |
| 6 | return c.json( |
| 7 | GetMeResponse.assertDecode({ |
| 8 | user: serializeUserSummary(c.get("user")), |
| 9 | }), |
| 10 | 200, |
| 11 | ); |
| 12 | }; |