feat: add admin dashboard and core API routes with Docker configuration
This commit is contained in:
@@ -18,10 +18,17 @@ export async function POST(request: NextRequest) {
|
||||
try {
|
||||
const { token, password } = await request.json();
|
||||
|
||||
if (!token || !password) {
|
||||
if (!token || !password || typeof password !== 'string') {
|
||||
return NextResponse.json({ error: 'Token et mot de passe sont requis' }, { status: 400 });
|
||||
}
|
||||
|
||||
if (password.length < 8) {
|
||||
return NextResponse.json(
|
||||
{ error: 'Le mot de passe doit contenir au moins 8 caractères' },
|
||||
{ status: 400 }
|
||||
);
|
||||
}
|
||||
|
||||
const user = await prisma.user.findFirst({
|
||||
where: {
|
||||
resetToken: token,
|
||||
|
||||
Reference in New Issue
Block a user