From c7306053d19bcf811e024ee8639ce0c44f9bcfaa Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Wed, 30 Dec 2020 01:00:49 +0530 Subject: [PATCH] fix: use orderType in DB query --- app/controllers/api/database.php | 1 + app/controllers/api/functions.php | 3 +++ app/controllers/api/projects.php | 1 + 3 files changed, 5 insertions(+) diff --git a/app/controllers/api/database.php b/app/controllers/api/database.php index ac2785a0e0..a3018ed026 100644 --- a/app/controllers/api/database.php +++ b/app/controllers/api/database.php @@ -115,6 +115,7 @@ App::get('/v1/database/collections') $results = $projectDB->getCollection([ 'limit' => $limit, 'offset' => $offset, + 'orderType' => $orderType, 'search' => $search, 'filters' => [ '$collection='.Database::SYSTEM_COLLECTION_COLLECTIONS, diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 2e696ddc47..da5572e80d 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -92,6 +92,7 @@ App::get('/v1/functions') $results = $projectDB->getCollection([ 'limit' => $limit, 'offset' => $offset, + 'orderType' => $orderType, 'search' => $search, 'filters' => [ '$collection='.Database::SYSTEM_COLLECTION_FUNCTIONS, @@ -503,6 +504,7 @@ App::get('/v1/functions/:functionId/tags') $results = $projectDB->getCollection([ 'limit' => $limit, 'offset' => $offset, + 'orderType' => $orderType, 'search' => $search, 'filters' => [ '$collection='.Database::SYSTEM_COLLECTION_TAGS, @@ -707,6 +709,7 @@ App::get('/v1/functions/:functionId/executions') $results = $projectDB->getCollection([ 'limit' => $limit, 'offset' => $offset, + 'orderType' => $orderType, 'search' => $search, 'filters' => [ '$collection='.Database::SYSTEM_COLLECTION_EXECUTIONS, diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 023e9e7c83..f2f5f7ad28 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -114,6 +114,7 @@ App::get('/v1/projects') $results = $consoleDB->getCollection([ 'limit' => $limit, 'offset' => $offset, + 'orderType' => $orderType, 'search' => $search, 'filters' => [ '$collection='.Database::SYSTEM_COLLECTION_PROJECTS,