summaryrefslogtreecommitdiffstats
path: root/lib/info.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/info.js')
-rw-r--r--lib/info.js40
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/info.js b/lib/info.js
index f6b37a8..1c15349 100644
--- a/lib/info.js
+++ b/lib/info.js
@@ -1,5 +1,5 @@
/*
-Copyright(c) 2017 AT&T Intellectual Property. All rights reserved.
+Copyright(c) 2018 AT&T Intellectual Property. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -19,27 +19,27 @@ See the License for the specific language governing permissions and limitations
"use strict";
const router = require('express').Router();
-
-/* Pick up config exported by main */
-const config = process.mainModule.exports.config;
+const logger = require('./logging').getLogger();
/* Accept an incoming event */
router.get('/', function(req, res) {
- res.json(
- {
- "server" : {
- "name": config.name,
- "description": config.description,
- "version": config.version,
- "branch": config.branch,
- "commit": config.commit,
- "commit_datetime": config.commit_datetime
- },
- "apiVersion": config.apiVersion,
- "links": config.apiLinks
- }
- );
- require('./logging').getLogger().audit(req, 200);
+ /* Pick up config exported by main */
+ const config = process.mainModule.exports.config;
+ const info = {
+ "server" : {
+ "name": config.name,
+ "description": config.description,
+ "version": config.version,
+ "branch": config.branch,
+ "commit": config.commit,
+ "commit_datetime": config.commit_datetime,
+ "server_instance_uuid": config.server_instance_uuid
+ },
+ "apiVersion": config.apiVersion,
+ "links": config.apiLinks
+ };
+ res.json(info);
+ logger.audit(req, 200, JSON.stringify(info));
});
-module.exports = router; \ No newline at end of file
+module.exports = router;