示例#1
0
    public async Task <IActionResult> DeleteLeague([FromBody] DeleteLeagueRequest request)
    {
        League?league = await _fantasyCriticService.GetLeagueByID(request.LeagueID);

        if (league is null)
        {
            return(BadRequest());
        }

        if (!league.TestLeague)
        {
            return(BadRequest());
        }

        await _fantasyCriticService.DeleteLeague(league);

        return(Ok());
    }