- 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.
21 lines
548 B
TypeScript
21 lines
548 B
TypeScript
import { NextResponse } from 'next/server';
|
|
import { dailyService } from '@/services/task-management/daily';
|
|
|
|
/**
|
|
* API route pour récupérer toutes les dates avec des dailies
|
|
* GET /api/daily/dates
|
|
*/
|
|
export async function GET() {
|
|
try {
|
|
const dates = await dailyService.getDailyDates();
|
|
return NextResponse.json({ dates });
|
|
|
|
} catch (error) {
|
|
console.error('Erreur lors de la récupération des dates:', error);
|
|
return NextResponse.json(
|
|
{ error: 'Erreur interne du serveur' },
|
|
{ status: 500 }
|
|
);
|
|
}
|
|
}
|