File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
nodejs-functions/src/handlers/automatic-clock-outs Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments