示例#1
0
        public async Task <IActionResult> GetAllAlerts()
        {
            User user = await _auth.GetUser(this.User.Identity.Name);

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

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

            var alertList = await _repo.GetAllAlerts();

            return(Ok(alertList));
        }