public IActionResult Open([FromRoute(Name = "id")] string id) { try { RouletteDto RouletteDto = _rouletteService.Get(id); if (RouletteDto == null) { return(NotFound()); } if (RouletteDto.Active) { return(BadRequest(new { error = false, msg = "RC004" })); } RouletteDto.Active = true; _rouletteService.Update(id, RouletteDto); return(Ok(RouletteDto.Active)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public IEnumerable <Roulette> Get() { return(_rouleteService.Get()); }