From 16d675c27aedbe2ba2364b343bed05604ca625e6 Mon Sep 17 00:00:00 2001 From: ElhamFadel Date: Thu, 4 Nov 2021 10:31:21 +0300 Subject: [PATCH] search endpoint #82 --- server/controllers/estates/filterEstate.js | 3 +++ server/controllers/estates/index.js | 2 ++ server/controllers/index.js | 4 ++-- server/database/quieres/filterEstate.js | 3 +++ server/database/quieres/index.js | 2 ++ 5 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 server/controllers/estates/filterEstate.js create mode 100644 server/database/quieres/filterEstate.js diff --git a/server/controllers/estates/filterEstate.js b/server/controllers/estates/filterEstate.js new file mode 100644 index 0000000..0ff85a4 --- /dev/null +++ b/server/controllers/estates/filterEstate.js @@ -0,0 +1,3 @@ +module.exports = () => { + +}; diff --git a/server/controllers/estates/index.js b/server/controllers/estates/index.js index 0275996..2564822 100644 --- a/server/controllers/estates/index.js +++ b/server/controllers/estates/index.js @@ -1,7 +1,9 @@ const editEstate = require('./editEstate'); const deleteEstate = require('./deleteEstate'); +const filterEstate = require('./filterEstate'); module.exports = { editEstate, deleteEstate, + filterEstate, }; diff --git a/server/controllers/index.js b/server/controllers/index.js index aeaa25e..042e0b7 100644 --- a/server/controllers/index.js +++ b/server/controllers/index.js @@ -1,8 +1,8 @@ const { userEstateshandler, login } = require('./users'); const getAllUsers = require('./users/getAllUsers'); -const { editEstate, deleteEstate } = require('./estates'); +const { editEstate, deleteEstate, filterEstate } = require('./estates'); const logout = require('./logout'); module.exports = { - getAllUsers, userEstateshandler, logout, login, deleteEstate, editEstate, + getAllUsers, userEstateshandler, logout, login, deleteEstate, editEstate, filterEstate, }; diff --git a/server/database/quieres/filterEstate.js b/server/database/quieres/filterEstate.js new file mode 100644 index 0000000..59dfc8f --- /dev/null +++ b/server/database/quieres/filterEstate.js @@ -0,0 +1,3 @@ +const connection = require('../config/connection'); + +module.exports = () => connection.query(); diff --git a/server/database/quieres/index.js b/server/database/quieres/index.js index 9c42a66..7e0c464 100644 --- a/server/database/quieres/index.js +++ b/server/database/quieres/index.js @@ -4,6 +4,7 @@ const checkAdminQuery = require('./checkAdmin'); const checkEmailQuery = require('./checkEmailQuery'); const editEstateQuery = require('./editEstatesQuery'); const deleteEstateQuery = require('./deleteEstateQuery'); +const filterEstate = require('./filterEstate'); module.exports = { getAllUsersQuery, @@ -12,4 +13,5 @@ module.exports = { checkEmailQuery, editEstateQuery, deleteEstateQuery, + filterEstate, };