From ab21aab5768e7dfbed3336c17632780be82546e9 Mon Sep 17 00:00:00 2001 From: Ralf Hauser Date: Thu, 2 Apr 2020 07:53:20 +0200 Subject: [PATCH] https://github.com/water-fountains/datablue/issues/47 --- .gitignore | 7 ++++++- server/api/controllers/controller.js | 5 +++++ server/api/controllers/router.js | 1 + server/common/swagger/Api.yaml | 7 +++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4fc51790..7d878ab2 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,9 @@ server/common/build.info.js .env .idea /.project -/nbproject/private/ \ No newline at end of file +/nbproject/private/ + +.DS_Store +nbproject/* +server/.DS_Store +server/api/.DS_Store \ No newline at end of file diff --git a/server/api/controllers/controller.js b/server/api/controllers/controller.js index cb9f2af9..614fec51 100644 --- a/server/api/controllers/controller.js +++ b/server/api/controllers/controller.js @@ -176,6 +176,11 @@ export class Controller { l.info("controller.js: getLocationMetadata sent "+new Date().toISOString()); } + getSharedConstants(req, res) { + doJson(res,sharedConstants,'getSharedConstants'); //res.json(locations); + l.info("controller.js: getSharedConstants sent "+new Date().toISOString()); + } + /** * Function to extract processing errors from detailed list of fountains */ diff --git a/server/api/controllers/router.js b/server/api/controllers/router.js index 9bf4909f..3bd68304 100644 --- a/server/api/controllers/router.js +++ b/server/api/controllers/router.js @@ -15,4 +15,5 @@ export default express .get('/fountains/', controller.byLocation) .get('/metadata/fountain_properties/', controller.getPropertyMetadata) .get('/metadata/locations/', controller.getLocationMetadata) + .get('/metadata/shared-constants/', controller.getSharedConstants) .get('/processing-errors/', controller.getProcessingErrors) diff --git a/server/common/swagger/Api.yaml b/server/common/swagger/Api.yaml index 4a9c327d..6566ac99 100644 --- a/server/common/swagger/Api.yaml +++ b/server/common/swagger/Api.yaml @@ -45,6 +45,13 @@ paths: 200: description: Returns location metadata. + /metadata/shared-constants: + get: + description: "Fetch shared consants between Datablue and Proximap." + responses: + 200: + description: Returns shared constants. + /fountain: get: description: Fetch detailed fountain information based on coordinates or identifier