File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 11import express from "express" ;
22import { getAdminLogs , getContractorManagerLogs } from "../controllers/logs" ;
3- import { adminLog } from "../services/logdata" ;
3+ import { adminLog , contractorLog } from "../services/logdata" ;
44const router = express . Router ( ) ;
55
66router . route ( "/checkin" ) . post ( ( req , res ) => {
77 const { flag } = req . body ;
88
99 if ( flag ) {
1010 adminLog ( "Checkin" , "Shawon Majid has checked in" ) ;
11+ contractorLog ( "Checkin" , "Shawon Majid has checked in" ) ;
1112 } else {
13+ contractorLog ( "Checkin" , "Shawon Majid has checked in" ) ;
1214 adminLog ( "Checkout" , "Shawon Majid has checked out" ) ;
1315 }
16+
17+ res . status ( 200 ) . json ( { message : "Checkin status updated" } ) ;
1418} ) ;
1519router . route ( "/admin" ) . get ( getAdminLogs ) ;
1620router . route ( "/contractor" ) . get ( getContractorManagerLogs ) ;
You can’t perform that action at this time.
0 commit comments