Skip to content

Commit 2a1dc12

Browse files
committed
style: Changes requested by reviews
1 parent bbf68f2 commit 2a1dc12

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

nodejs-functions/src/handlers/automatic-clock-outs/clock_out.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const doClockOut = async (context) => {
3939
await container.item(timeEntryAsJson.id, timeEntryAsJson.tenant_id).replace(timeEntryAsJson);
4040
totalClockOutsExecuted++;
4141
}
42-
42+
4343
else if (timeEntry.needsToBeClockedOutMidnight()) {
4444
if (userId) {
4545
SlackClient.sendMessageToUser(userId, CLOCK_OUT_MESSAGE_MIDNIGHT.replace('%user_name%', userName));

nodejs-functions/src/handlers/automatic-clock-outs/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ const config = {
88
clientSecret: process.env["CLIENT_SECRET"],
99
slackApiToken: process.env["SLACK_TOKEN_NOTIFY"],
1010
userNameMS: process.env["USER_NAME_MS"],
11-
userPasswordMS: process.env["USER_PASSWORD_MS"]
12-
11+
userPasswordMS: process.env["USER_PASSWORD_MS"],
12+
B2CLogin = process.env["B2C_LOGIN"]
1313
};
1414

1515
module.exports = config;

nodejs-functions/src/handlers/automatic-clock-outs/msal_client.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ const axios = require('axios');
22
const config = require('./config');
33

44
const getToken = async () => {
5-
const { clientId, userNameMS, userPasswordMS } = config;
6-
const endpoint =
7-
'https://ioetec.b2clogin.com/ioetec.onmicrosoft.com/B2C_1_accesstoken/oauth2/v2.0/token';
5+
const { clientId, userNameMS, userPasswordMS, B2CLogin } = config;
6+
const endpoint = B2CLogin;
87

98
const params = new URLSearchParams();
109

0 commit comments

Comments
 (0)