Exemple #1
0
        public async Task <ActionResult> Draw([FromBody] DrawDTO draw)
        {
            if (ModelState.IsValid)
            {
                bool result = await _drawService.CreateDrawAsync(draw);

                if (result)
                {
                    return(Ok("Drawn lotto numbers has been published."));
                }
            }

            return(BadRequest("Either the numbers are already drawn, or something went wrong along the way."));
        }