Beispiel #1
0
        public async Task <JsonReturn> AtribuirPrazoParaFuncionario([FromBody] FuncionarioTarefaModel id)
        {
            var retorno = new JsonReturn();

            try
            {
                retorno.Object = await _agendaService.AtribuirPrazoParaFuncionario(userGuid, id.Id, id.NomeParticipante, id.IdTarefa);

                retorno.Message = "Prazo atribuido com sucesso.";

                return(retorno);
            }
            catch (Exception ex)
            {
                //loggar erro
                retorno.Status  = System.Net.HttpStatusCode.InternalServerError;
                retorno.Object  = ex.GetBaseException();
                retorno.Message = "Erro ao atribuir prazo.";

                return(retorno);
            }
        }