forked from Yara724/api
Added persian error messages (only for auth for now)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user