This commit is contained in:
José Valdiviesso 2019-03-02 03:57:16 +00:00
parent 7eac9f6c9c
commit 374443be43
1 changed files with 9 additions and 0 deletions

View File

@ -41,5 +41,14 @@ namespace api.Controllers
var Teams = await context.Teams.ToArrayAsync();
return Ok(Teams);
}
// GET api/teams/e/[id]
// GET all teams for event id
[HttpGet("e/{id}")]
public async Task<IActionResult> GetTeamsEvent(int id)
{
var Teams = await context.Teams.FirstOrDefaultAsync(e=>e.EventId == id);
return Ok(Teams);
}
}
}