Beispiel #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."));
        }
Beispiel #2
0
        public async Task <IHttpActionResult> DeleteRule(int id)
        {
            await _ruleService.DeleteRuleAsync(id);

            return(Ok());
        }