Skip to content

Commit

Permalink
fix: remove Model_PasswordTooShort
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Feb 11, 2024
1 parent 95bde79 commit eb51974
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
3 changes: 1 addition & 2 deletions src/GZCTF/Controllers/AdminController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ public async Task<IActionResult> AddUsers([FromBody] UserCreateModel[] model, Ca
if (userInfo is null)
{
await trans.RollbackAsync(token);
return BadRequest(new RequestResponse(result.Errors.FirstOrDefault()?.Description ??
localizer[nameof(Resources.Program.Identity_UnknownError)]));
return HandleIdentityError(result.Errors);
}

userInfo.UpdateUserInfo(user);
Expand Down
1 change: 0 additions & 1 deletion src/GZCTF/Models/Request/Account/LoginModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@ public class LoginModel : ModelWithCaptcha
/// 密码
/// </summary>
[Required]
[MinLength(6, ErrorMessageResourceName = nameof(Resources.Program.Model_PasswordTooShort))]
public string Password { get; set; } = string.Empty;
}
1 change: 0 additions & 1 deletion src/GZCTF/Models/Request/Admin/UserCreateModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public class UserCreateModel
/// 密码
/// </summary>
[Required(ErrorMessageResourceName = nameof(Resources.Program.Model_PasswordRequired))]
[MinLength(6, ErrorMessageResourceName = nameof(Resources.Program.Model_PasswordTooShort))]
public string Password { get; set; } = string.Empty;

/// <summary>
Expand Down

0 comments on commit eb51974

Please sign in to comment.