Skip to content

Commit 3ecb0d3

Browse files
author
Sachin Maheshwari
committed
correction in context-path.
1 parent 8ec813b commit 3ecb0d3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ function start(handlers) {
190190
next();
191191
});
192192
if ((url !== '/email/health')
193-
&& (url !== `${config.API_VERSION}/${config.API_CONTEXT_PATH}/health`)) {
193+
&& (url !== `${config.API_CONTEXT_PATH}/${config.API_VERSION}/health`)) {
194194
actions.push(jwtAuth());
195195
actions.push((req, res, next) => {
196196
if (!req.authUser) {

src/routes.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@
22

33
const config = require('config');
44

5-
var routes = {};
5+
const routes = {};
66

7-
let oldkeyEventType = '/email/templates/eventType/:name';
7+
const oldkeyEventType = '/email/templates/eventType/:name'
88
routes[oldkeyEventType] = {
99
get: {
1010
controller: 'TemplateController',
1111
method: 'eventTypes',
1212
}
1313
};
1414

15-
let oldkeyHealthCheck = '/email/health';
15+
const oldkeyHealthCheck = '/email/health'
1616
routes[oldkeyHealthCheck] = {
1717
get: {
1818
controller: 'HealthController',
1919
method: 'health',
2020
}
2121
};
2222

23-
let keyEventType = `${config.API_VERSION}/${config.API_CONTEXT_PATH}/templates/eventType/:name`;
23+
const keyEventType = `${config.API_CONTEXT_PATH}/${config.API_VERSION}/templates/eventType/:name`;
2424
routes[keyEventType] = {
2525
get: {
2626
controller: 'TemplateController',
2727
method: 'eventTypes',
2828
}
2929
};
3030

31-
let keyHealthCheck = `${config.API_VERSION}/${config.API_CONTEXT_PATH}/health`;
31+
const keyHealthCheck = `${config.API_CONTEXT_PATH}/${config.API_VERSION}/health`;
3232
routes[keyHealthCheck] = {
3333
get: {
3434
controller: 'HealthController',

0 commit comments

Comments
 (0)