From c5f26e661f7a398700d9f37da86b6a1332284380 Mon Sep 17 00:00:00 2001 From: Pierre Date: Mon, 1 Jan 2018 15:43:37 +0100 Subject: [PATCH] Made search more clear --- RestControllers/searchController.php | 6 +++--- classes/components/{searchUser.php => search.php} | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) rename classes/components/{searchUser.php => search.php} (68%) diff --git a/RestControllers/searchController.php b/RestControllers/searchController.php index 26c8dd8..fed1c96 100644 --- a/RestControllers/searchController.php +++ b/RestControllers/searchController.php @@ -10,10 +10,10 @@ class searchController /** * Peform a research on the database * - * @url POST /search/request + * @url POST /search/user * @url POST /user/search */ - public function searchDatabase(){ + public function search_user(){ user_login_required(); //Check if the query was specified with the request @@ -28,7 +28,7 @@ class searchController Rest_fatal_error(401, "Invalid search limit !"); //Perform research on the database and return results - $results = CS::get()->components->searchUser->search($_POST['query'], $searchLimit); + $results = CS::get()->components->search->search_user($_POST['query'], $searchLimit); if($results === false) Rest_fatal_error(500, "An error occured while trying to perform a research in user list !"); diff --git a/classes/components/searchUser.php b/classes/components/search.php similarity index 68% rename from classes/components/searchUser.php rename to classes/components/search.php index e5677db..de0921e 100644 --- a/classes/components/searchUser.php +++ b/classes/components/search.php @@ -1,20 +1,20 @@