Esempio n. 1
0
        public async Task <IActionResult> GetCards([FromRoute] long boxId, [FromRoute] long trayId)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            try
            {
                var cards = await _boxService.GetCards(User.GetId(), boxId, trayId);

                return(Ok(cards));
            }
            catch (Exception e)
            {
                return(BadRequest(e));
            }
        }