- 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.
20 lines
683 B
TypeScript
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;
|