public IActionResult Delete(int id) { try { // check if admin _triggerService.Delete(id); return(Ok()); } catch (AppException ex) { // return error message if there was an exception return(BadRequest(new { message = ex.Message })); } }