Skip to content

Commit 6b886c8

Browse files
author
hirsch88
committed
Rename BasicAuthentication
1 parent b851cf9 commit 6b886c8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/core/ApiMonitor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as express from 'express';
22
import * as monitor from 'express-status-monitor';
33
import { Environment } from './helpers/Environment';
4-
import { BasicAuthenticate } from './BasicAuthenticate';
4+
import { BasicAuthentication } from './BasicAuthentication';
55

66

77
export class ApiMonitor {
@@ -13,7 +13,7 @@ export class ApiMonitor {
1313
public setup(app: express.Application): void {
1414
if (Environment.isTruthy(process.env.MONITOR_ENABLED)) {
1515
app.use(monitor());
16-
app.get(ApiMonitor.getRoute(), BasicAuthenticate(), monitor().pageRoute);
16+
app.get(ApiMonitor.getRoute(), BasicAuthentication(), monitor().pageRoute);
1717
}
1818
}
1919
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as basicAuth from 'express-basic-auth';
22

33

4-
export const BasicAuthenticate = (): any => {
4+
export const BasicAuthentication = (): any => {
55
return basicAuth({
66
users: {
77
[process.env.APP_BASIC_USER]: process.env.APP_BASIC_PASSWORD

src/core/SwaggerUI.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as express from 'express';
22
import * as path from 'path';
33
import * as swaggerUi from 'swagger-ui-express';
44
import { Environment } from './helpers/Environment';
5-
import { BasicAuthenticate } from './BasicAuthenticate';
5+
import { BasicAuthentication } from './BasicAuthentication';
66

77

88
export class SwaggerUI {
@@ -26,7 +26,7 @@ export class SwaggerUI {
2626
};
2727

2828
// Initialize swagger-jsdoc -> returns validated swagger spec in json format
29-
app.use(SwaggerUI.getRoute(), BasicAuthenticate(), swaggerUi.serve, swaggerUi.setup(swaggerFile));
29+
app.use(SwaggerUI.getRoute(), BasicAuthentication(), swaggerUi.serve, swaggerUi.setup(swaggerFile));
3030
}
3131
}
3232
}

0 commit comments

Comments
 (0)