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()); }
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()); }