Пример #1
0
        [HttpDelete("DeleteAlert")] //[HttpDelete("DeleteAlert/{Id}")]
        public async Task <IActionResult> DeleteAlert(int Id)
        {
            User user = await _auth.GetUser(this.User.Identity.Name);

            Permissions permissions = await _auth.GetPermissions(user.Id);

            if (permissions.DeleteAlert == false)
            {
                return(Unauthorized());
            }

            var deletedAlert = await _repo.DeleteAlert(Id);

            return(StatusCode(201));
        }