public IActionResult UpdateInfo([FromBody] Club entity) { var decodedToken = authentication.DecodeTokenFromRequest(Request.Headers["Authorization"]); string role = authentication.GetRoleFromToken(decodedToken); int id = authentication.GetIDFromToken(decodedToken); if (role == "Club") { // Update club info entity.Id = id; if (_clubLogic.UpdateInfo(entity)) { return(Ok()); } } return(StatusCode(500, "Failed")); }