Refactor ESLint configuration and update code formatting: Standardize quotes in eslint.config.mjs, next.config.js, and various TypeScript files for consistency. Add Prettier as a dependency and include formatting scripts in package.json. Clean up unnecessary whitespace in multiple files to enhance code readability.
This commit is contained in:
@@ -24,7 +24,9 @@ export async function PUT(request: Request) {
|
||||
|
||||
if (newPassword.length < 6) {
|
||||
return NextResponse.json(
|
||||
{ error: "Le nouveau mot de passe doit contenir au moins 6 caractères" },
|
||||
{
|
||||
error: "Le nouveau mot de passe doit contenir au moins 6 caractères",
|
||||
},
|
||||
{ status: 400 }
|
||||
);
|
||||
}
|
||||
@@ -50,7 +52,10 @@ export async function PUT(request: Request) {
|
||||
}
|
||||
|
||||
// Vérifier l'ancien mot de passe
|
||||
const isPasswordValid = await bcrypt.compare(currentPassword, user.password);
|
||||
const isPasswordValid = await bcrypt.compare(
|
||||
currentPassword,
|
||||
user.password
|
||||
);
|
||||
|
||||
if (!isPasswordValid) {
|
||||
return NextResponse.json(
|
||||
@@ -77,4 +82,3 @@ export async function PUT(request: Request) {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user