Files
gruperly/apps/backend/src/modules/classes/features/public-details/route.ts
Jose Selesan 69275c37b4 chore: update comments and documentation for clarity and consistency across various files
- Translated comments from Spanish to English in vite.config.ts, docker-compose.yml, attendance-risk.ts, analytics.ts, attendance.ts, attendees.ts, enums.ts, groups.ts, and onboarding.ts.
- Improved descriptions for better understanding of code functionality and purpose.
- Ensured uniformity in terminology and phrasing throughout the codebase.
2026-10-01 16:06:54 -03:00

20 lines
683 B
TypeScript

import type { AbsenceQuery } from '@gruperly/shared';
import { AbsenceQuerySchema } from '@gruperly/shared';
import { Hono } from 'hono';
import { resultJson } from '@/http/problem-details';
import { validate } from '@/http/validate';
import { GetAbsenceDetails } from './use-case';
const route = new Hono();
// Public route (whitelisted in session-auth): the attendee gets in with their personal token.
route.get('/absence', validate.query(AbsenceQuerySchema), async (c) => {
const query = c.req.valid('query') as AbsenceQuery;
const useCase = new GetAbsenceDetails();
const result = await useCase.execute(query);
return resultJson(c, result);
});
export default route;