Fix bug in ticket count in admin panel list users (#967)

This commit is contained in:
LautaroCesso 2021-01-19 17:15:43 -03:00 committed by GitHub
parent 45a59e0b20
commit e6441179c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -56,7 +56,11 @@ class DeleteController extends Controller {
throw new RequestException(ERRORS::NO_PERMISSION);
}
$ticketAuthor = User::getUser($ticket->authorToArray()['id']);
$ticketAuthor->tickets--;
$ticket->delete();
$ticketAuthor->store();
Response::respondSuccess();
}