public IActionResult DeleteSquadPlayer([FromBody] IDRequest data) { var decodedToken = authentication.DecodeTokenFromRequest(Request.Headers["Authorization"]); string role = authentication.GetRoleFromToken(decodedToken); int id = authentication.GetIDFromToken(decodedToken); if (role == "Club") { if (_clubLogic.DeleteSquadPlayer(data.ID, id)) { return(Ok()); } } return(StatusCode(500, "Failed")); }