import { Hono } from 'hono'; import { problemJson, resultJson, unauthorizedProblem } from '@/http/problem-details'; import { GetAttendeeStats } from './use-case'; const route = new Hono(); route.get('/:groupId/attendees/:attendeeId/stats', async (c) => { const user = c.get('user'); if (!user) { return problemJson(c, unauthorizedProblem(c.req.path)); } const groupId = c.req.param('groupId'); const attendeeId = c.req.param('attendeeId'); const useCase = new GetAttendeeStats(); const result = await useCase.execute(groupId, attendeeId, user.id); return resultJson(c, result); }); export default route;