Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style: Changes requested by reviews
  • Loading branch information
cxcarvaj committed Feb 16, 2022
commit 2a1dc12869c24a6bb816742f949020ccb639b66e
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const doClockOut = async (context) => {
await container.item(timeEntryAsJson.id, timeEntryAsJson.tenant_id).replace(timeEntryAsJson);
totalClockOutsExecuted++;
}

else if (timeEntry.needsToBeClockedOutMidnight()) {
if (userId) {
SlackClient.sendMessageToUser(userId, CLOCK_OUT_MESSAGE_MIDNIGHT.replace('%user_name%', userName));
Expand Down
4 changes: 2 additions & 2 deletions nodejs-functions/src/handlers/automatic-clock-outs/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const config = {
clientSecret: process.env["CLIENT_SECRET"],
slackApiToken: process.env["SLACK_TOKEN_NOTIFY"],
userNameMS: process.env["USER_NAME_MS"],
userPasswordMS: process.env["USER_PASSWORD_MS"]

userPasswordMS: process.env["USER_PASSWORD_MS"],
B2CLogin = process.env["B2C_LOGIN"]
};

module.exports = config;
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ const axios = require('axios');
const config = require('./config');

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

const params = new URLSearchParams();

Expand Down