Ejemplo n.º 1
0
        private async Task <IActionResult> Delete(string Id)
        {
            try
            {
                var command = new DeleteTrasferimentoCommand()
                {
                    CodiceSede  = Request.Headers["CodiceSede"],
                    IdOperatore = Request.Headers["IdUtente"],

                    Id = Id
                };

                _deleteCommandHandler.Handle(command);

                return(Ok());
            }
            catch (Exception ex)
            {
                if (ex.Message.Contains(Costanti.UtenteNonAutorizzato))
                {
                    return(StatusCode(403, new { message = Costanti.UtenteNonAutorizzato }));
                }
                else
                {
                    return(BadRequest(ex));
                }
            }
        }
Ejemplo n.º 2
0
 public Task SendNotification(DeleteTrasferimentoCommand command)
 {
     return(null);
 }