From df844f1a36bee563fcf0921bc98327597d994854 Mon Sep 17 00:00:00 2001 From: Samuel Tallet Date: Mon, 16 Nov 2020 20:57:21 +0100 Subject: [PATCH] Sort databases and collections --- index.php | 2 +- src/Controllers/DatabaseController.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 43c4b6a..18e1c6c 100644 --- a/index.php +++ b/index.php @@ -18,7 +18,7 @@ * * @var string */ -define('MPG_APP_VERSION', '1.0.9'); +define('MPG_APP_VERSION', '1.1.0'); /** * Development mode? diff --git a/src/Controllers/DatabaseController.php b/src/Controllers/DatabaseController.php index b924f29..ecfba6b 100644 --- a/src/Controllers/DatabaseController.php +++ b/src/Controllers/DatabaseController.php @@ -27,6 +27,8 @@ public static function getDatabaseNames() : array { } + sort($databaseNames); + return $databaseNames; } @@ -167,6 +169,8 @@ public function listCollectionsAction() : Response { return new JsonResponse(500, ErrorNormalizer::normalize($th, __METHOD__)); } + sort($collectionNames); + return new JsonResponse(200, $collectionNames); }