Added persian error messages (only for auth for now)

This commit is contained in:
2026-07-31 20:00:46 +03:30
parent 77cf420c33
commit 2cada1eba0
3 changed files with 15 additions and 15 deletions

View File

@@ -210,13 +210,13 @@ export class ActorAuthService {
): Promise<any> {
const user = await this.dynamicDbController(role, username);
if (!user) {
throw new NotFoundException("Actor account not found");
throw new NotFoundException("حساب کاربری یافت نشد");
}
if (user.role !== role) {
throw new UnauthorizedException("user not assigned to this role");
throw new UnauthorizedException("این حساب به نقش انتخاب‌شده تعلق ندارد");
}
if (!(await this.hashService.compare(pass, user.password))) {
throw new UnauthorizedException("password is incorrect or access Denied");
throw new UnauthorizedException("نام کاربری یا رمز عبور اشتباه است");
}
return user;
}
@@ -229,7 +229,7 @@ export class ActorAuthService {
const username = this.parseActorLoginUsername(body);
const password = body?.password;
if (typeof password !== "string" || !password) {
throw new BadRequestException("password is required");
throw new BadRequestException("رمز عبور الزامی است");
}
const captchaId =
typeof body?.captchaId === "string" ? body.captchaId : undefined;