Пример #1
0
 public async Task <object> CambiarEstadoBadge(string idStatus, [FromBody] SetBadgeStatus_DTO nuevoStatus)
 {
     try
     {
         return(await _badge_REP_LOCAL.ActualizarEstadoBadge(idStatus, nuevoStatus));
     }
     catch (Exception ex)
     {
         return(BadRequest("error: " + ex.Message + " " + ex.StackTrace + " " + ex.InnerException));
     }
 }
Пример #2
0
        public async Task <object> CambiarEstadoBadge(string idStatus, [FromBody] SetBadgeStatus_DTO nuevoStatus)
        {
            try
            {
                object result = new
                {
                    success = await _badge_REP_LOCAL.ActualizarEstadoBadge(idStatus, nuevoStatus),
                    status  = 200,
                    data    = "Done"
                };
                return(result);
            }
            catch (Exception ex)
            {
                object result = new
                {
                    success = false,
                    status  = 400,
                    data    = ex.Message
                };

                return(BadRequest(result));
            }
        }