public ActionResult AddCurrentUserToLeagueByGuid(string guid, string userId = null) { var league = _leagueRepository.GetLeagueByGuid(guid); if (league == null) { return(CreateJsonError($"Finner ikke liga med kode: {guid}.")); } RemoveLeagueFromCache(league); return(AddCurrentUserToLeague(league, userId)); }