fix(build): resolve linter and tsconfig project service errors, guarantee dist/main existence in start-dev
Deploy Canina / deploy (push) Has been cancelled
Deploy Canina / deploy (push) Has been cancelled
This commit is contained in:
1 parent
a291fa0c4a
commit
6362750dea
50 files changed
+12128
-10959
No files matched your search
@@ -130,7 +130,8 @@ export class UsersService {
|
||||
|
||||
const updateData: Prisma.UserUpdateInput = {};
|
||||
|
||||
if (dto.firstName !== undefined) updateData.firstName = dto.firstName.trim();
|
||||
if (dto.firstName !== undefined)
|
||||
updateData.firstName = dto.firstName.trim();
|
||||
if (dto.lastName !== undefined) updateData.lastName = dto.lastName.trim();
|
||||
|
||||
if (dto.mobile !== undefined) {
|
||||
@@ -140,7 +141,9 @@ export class UsersService {
|
||||
where: { mobile: normalizedMobile },
|
||||
});
|
||||
if (existing && existing.id !== id) {
|
||||
throw new BadRequestException('این شماره موبایل قبلاً توسط کاربر دیگری ثبت شده است');
|
||||
throw new BadRequestException(
|
||||
'این شماره موبایل قبلاً توسط کاربر دیگری ثبت شده است',
|
||||
);
|
||||
}
|
||||
updateData.mobile = normalizedMobile;
|
||||
}
|
||||
@@ -153,7 +156,9 @@ export class UsersService {
|
||||
where: { email: normalizedEmail },
|
||||
});
|
||||
if (existing && existing.id !== id) {
|
||||
throw new BadRequestException('این آدرس ایمیل قبلاً توسط کاربر دیگری ثبت شده است');
|
||||
throw new BadRequestException(
|
||||
'این آدرس ایمیل قبلاً توسط کاربر دیگری ثبت شده است',
|
||||
);
|
||||
}
|
||||
}
|
||||
updateData.email = normalizedEmail;
|
||||
@@ -163,9 +168,14 @@ export class UsersService {
|
||||
// If user already has a password set, require and verify currentPassword
|
||||
if (user.password) {
|
||||
if (!dto.currentPassword) {
|
||||
throw new BadRequestException('برای تغییر رمز عبور، وارد کردن رمز عبور فعلی الزامی است');
|
||||
throw new BadRequestException(
|
||||
'برای تغییر رمز عبور، وارد کردن رمز عبور فعلی الزامی است',
|
||||
);
|
||||
}
|
||||
const isCurrentMatch = await bcrypt.compare(dto.currentPassword.trim(), user.password);
|
||||
const isCurrentMatch = await bcrypt.compare(
|
||||
dto.currentPassword.trim(),
|
||||
user.password,
|
||||
);
|
||||
if (!isCurrentMatch) {
|
||||
throw new BadRequestException('رمز عبور فعلی اشتباه است');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user