Exemplo n.º 1
0
        public async Task <ActionResult <AdminResponse> > DeleteAdmin(int superAdminId, int adminId)
        {
            int currentUserId = this.CurrentUserID();

            if (currentUserId == 0 || currentUserId != superAdminId)
            {
                return(Unauthorized());
            }
            var response = await _adminUserService.DeleteAdmin(adminId);

            return(Ok(response));
        }