Esempio n. 1
0
        public async Task <ActionResult> SetPayed(int id)
        {
            try
            {
                await _orderStatusesService.SetPayed(id, User);

                return(RedirectToAction(nameof(Details), new { id }));
            }
            catch (NotFoundException)
            {
                return(NotFound());
            }
            catch (UnauthorizedAccessException)
            {
                return(Forbid());
            }
            catch
            {
                return(BadRequest());
            }
        }