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

            try
            {
                var card = await _boxService.GetCard(User.GetId(), boxId, trayId, cardId);

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