Пример #1
0
 public IActionResult SwapPassword([FromBody] User user)
 {
     if (user.Id == null)
     {
         return(BadRequest());
     }
     user.Password = ValidateUser.ValidateSwapPassword(user.Password);
     _db.Users.ReplaceOne(u => u.Id == user.Id, user);
     return(Ok());
 }