feat: introduce Teams & OKRs feature with models, types, and UI components for team management and objective tracking
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 12m53s

This commit is contained in:
Julien Froidefond
2026-01-07 10:11:59 +01:00
parent e3a47dd7e5
commit 5f661c8bfd
35 changed files with 3993 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
import { NextResponse } from 'next/server';
import { auth } from '@/lib/auth';
import { prisma } from '@/services/database';
export async function GET() {
try {
const session = await auth();
if (!session?.user?.id) {
return NextResponse.json({ error: 'Non autorisé' }, { status: 401 });
}
const users = await prisma.user.findMany({
select: {
id: true,
email: true,
name: true,
},
orderBy: {
createdAt: 'desc',
},
});
return NextResponse.json(users);
} catch (error) {
console.error('Error fetching users:', error);
return NextResponse.json(
{ error: 'Erreur lors de la récupération des utilisateurs' },
{ status: 500 }
);
}
}