Auth controller very minor changes

This commit is contained in:
KharchenkoVladimir 2021-10-19 16:58:40 +05:00
parent 387b01c44d
commit 1d26c3dc9d
2 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,7 @@ namespace AsbCloudInfrastructure.Services
if (userDto.Password.Length < 3)
return -2;
if (userDto.Email.Length is > 255)
if (userDto.Email.Length > 255)
return -3;
if (userDto.Phone.Length > 50)

View File

@ -63,7 +63,7 @@ namespace AsbCloudWebApi.Controllers
{
const string roleName = "Администратор";
if (!User.IsInRole(roleName))
return Forbid($"You mast be an {roleName}.");
return Forbid($"You must be in {roleName}.");
var code = authService.Register(user);
return code switch
@ -90,7 +90,7 @@ namespace AsbCloudWebApi.Controllers
var allow = (User.GetUserId() == idUser) || User.IsInRole(roleName);
if (!allow)
return Forbid($"You mast be an {roleName} or user with id:{idUser}.");
return Forbid($"You must be an {roleName} or user with id:{idUser}.");
var code = authService.ChangePassword(idUser, newPassword);
return code switch