feat: implement groups risk overview feature with analytics and routes

This commit is contained in:
Jose Selesan
2026-09-24 20:45:11 -03:00
parent 2e184845e1
commit efde1aaf33
11 changed files with 382 additions and 16 deletions

View File

@@ -0,0 +1,19 @@
import { Hono } from 'hono';
import { problemJson, resultJson, unauthorizedProblem } from '@/http/problem-details';
import { GetGroupsRiskOverview } from './use-case';
const route = new Hono();
route.get('/overview', async (c) => {
const user = c.get('user');
if (!user) {
return problemJson(c, unauthorizedProblem(c.req.path));
}
const useCase = new GetGroupsRiskOverview();
const result = await useCase.execute(user.id);
return resultJson(c, result);
});
export default route;