public IActionResult DeveloperResetPassword([FromQuery] string username, [FromQuery] string oldpassword, [FromQuery] string newpassword) { try { if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(oldpassword) || string.IsNullOrEmpty(newpassword)) { return(BadRequest("Invalid request parameter")); } var result = MongoConnector.DeveloperPasswordReset(username, oldpassword, newpassword); if (result) { return(Ok(result)); } else { return(BadRequest("Invalid credentials")); } } catch (Exception ex) { return(BadRequest(ex)); } }