Browse Source

update

zmiguel
José Valdiviesso 3 years ago
parent
commit
374443be43
  1. 9
      api/Controllers/TeamsController.cs

9
api/Controllers/TeamsController.cs

@ -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);
}
}
}

Loading…
Cancel
Save