Ejemplo n.º 1
0
        public async Task <IHttpActionResult> DeleteExistingRule(int ruleId)
        {
            _service.SetUserId(User.Identity.GetUserId());

            if (await _service.DeleteRuleAsync(ruleId))
            {
                return(Ok("Rule deleted successfully."));
            }

            return(BadRequest("Could not delete rule."));
        }
Ejemplo n.º 2
0
        public async Task <IHttpActionResult> DeleteRule(int id)
        {
            await _ruleService.DeleteRuleAsync(id);

            return(Ok());
        }