Skip to content

Commit bbf68f2

Browse files
committed
style: Changes requested by review
1 parent 55a06c2 commit bbf68f2

File tree

1 file changed

+5
-4
lines changed
  • nodejs-functions/src/handlers/automatic-clock-outs

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const doClockOut = async (context) => {
2828
await Promise.all(
2929
entries.map(async (timeEntryAsJson) => {
3030
const timeEntry = new TimeEntry(timeEntryAsJson);
31-
const { userName, userEmail } = findUserData( users, timeEntry.timeEntry.owner_id);
31+
const { userName, userEmail } = findUserData(users, timeEntry.timeEntry.owner_id);
3232
const userId = findSlackUserId(slackUsers, userEmail);
3333

3434
if (timeEntry.needsToBeClockedOut()) {
@@ -38,10 +38,11 @@ const doClockOut = async (context) => {
3838
timeEntryAsJson.end_date = timeEntry.getTimeToClockOut();
3939
await container.item(timeEntryAsJson.id, timeEntryAsJson.tenant_id).replace(timeEntryAsJson);
4040
totalClockOutsExecuted++;
41-
42-
} else if (timeEntry.needsToBeClockedOutMidnight()) {
41+
}
42+
43+
else if (timeEntry.needsToBeClockedOutMidnight()) {
4344
if (userId) {
44-
SlackClient.sendMessageToUser(userId,CLOCK_OUT_MESSAGE_MIDNIGHT.replace('%user_name%', userName));
45+
SlackClient.sendMessageToUser(userId, CLOCK_OUT_MESSAGE_MIDNIGHT.replace('%user_name%', userName));
4546
}
4647
timeEntryAsJson.end_date = timeEntry.getTimeToClockOutMidnight();
4748
await container.item(timeEntryAsJson.id, timeEntryAsJson.tenant_id).replace(timeEntryAsJson);

0 commit comments

Comments
 (0)