示例#1
0
        public async Task <object> CrearBadge([FromBody] AddBadge_DTO newBadge)
        {
            try
            {
                object result = new
                {
                    success = true,
                    status  = 200,
                    data    = await _badge_REP_LOCAL.CrearBadge(newBadge)
                };
                return(result);
            }
            catch (Exception ex)
            {
                object result = new
                {
                    success = false,
                    status  = 400,
                    data    = ex.Message
                };

                return(BadRequest(result));
            }
        }
示例#2
0
 public async Task <object> CrearBadge([FromBody] AddBadge_DTO newBadge)
 {
     return(await _badge_REP_LOCAL.CrearBadge(newBadge));
 }