Files
towercontrol/src/app/api/tasks/[id]/checkboxes/route.ts
Julien Froidefond f5417040fd feat: complete Phase 4 of service refactoring
- Marked tasks in `TODO.md` as completed for moving task-related files to the `task-management` directory and correcting imports across the codebase.
- Updated imports in `seed-data.ts`, `seed-tags.ts`, API routes, and various components to reflect the new structure.
- Removed obsolete `daily.ts`, `tags.ts`, and `tasks.ts` files to streamline the codebase.
- Added new tasks in `TODO.md` for future cleaning and organization of service imports.
2025-09-23 10:25:41 +02:00

29 lines
763 B
TypeScript

import { NextRequest, NextResponse } from 'next/server';
import { tasksService } from '@/services/task-management/tasks';
export async function GET(
request: NextRequest,
{ params }: { params: Promise<{ id: string }> }
) {
try {
const { id } = await params;
if (!id) {
return NextResponse.json(
{ error: 'ID de tâche requis' },
{ status: 400 }
);
}
const checkboxes = await tasksService.getTaskRelatedCheckboxes(id);
return NextResponse.json({ data: checkboxes });
} catch (error) {
console.error('Erreur lors de la récupération des checkboxes:', error);
return NextResponse.json(
{ error: 'Erreur lors de la récupération des checkboxes' },
{ status: 500 }
);
}
}