From d7efb4c4a2ca16c800276c942ca414a6da8f491d Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 3 Mar 2018 21:45:10 -0600 Subject: [PATCH] Fix inability to revoke admin tokens from daemon --- CHANGELOG.md | 1 + app/Repositories/Daemon/ServerRepository.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ee5c4c31..bc9321981 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. * Search term is now passed through when using paginated result sets. * Reduces the number of SQL queries executed when rendering the server listing to increase performance. * Fixes exceptions being thrown for non-existent subuser permissions. +* Fixes exception caused when trying to revoke admin privileges from a user account due to a bad endpoint. ### Changed * Databases are now properly paginated when viewing a database host. diff --git a/app/Repositories/Daemon/ServerRepository.php b/app/Repositories/Daemon/ServerRepository.php index 3af381d1c..bdc7fc99c 100644 --- a/app/Repositories/Daemon/ServerRepository.php +++ b/app/Repositories/Daemon/ServerRepository.php @@ -115,7 +115,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa public function revokeAccessKey($key): ResponseInterface { if (is_array($key)) { - return $this->getHttpClient()->request('POST', 'keys', [ + return $this->getHttpClient()->request('POST', 'keys/batch-delete', [ 'json' => $key, ]); }