Esempio n. 1
0
        public async Task <IActionResult> ArchiveInvoice(int Id)
        {
            User user = await _auth.GetUser(this.User.Identity.Name);

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

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

            var removedInvoice = await _Irepo.ArchiveInvoice(Id);

            return(StatusCode(201));
        }