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)); } }
public async Task <object> CrearBadge([FromBody] AddBadge_DTO newBadge) { return(await _badge_REP_LOCAL.CrearBadge(newBadge)); }