@@ -14,6 +14,7 @@ const mapEventTypes = {
1414 [ PROJECT_STATUS . COMPLETED ] : BUS_API_EVENT . PROJECT_COMPLETED ,
1515 [ PROJECT_STATUS . CANCELLED ] : BUS_API_EVENT . PROJECT_CANCELED ,
1616 [ PROJECT_STATUS . PAUSED ] : BUS_API_EVENT . PROJECT_PAUSED ,
17+ [ PROJECT_STATUS . ACTIVE ] : BUS_API_EVENT . PROJECT_ACTIVE ,
1718} ;
1819
1920module . exports = ( app , logger ) => {
@@ -27,6 +28,7 @@ module.exports = (app, logger) => {
2728 createEvent ( BUS_API_EVENT . PROJECT_CREATED , {
2829 projectId : project . id ,
2930 projectName : project . name ,
31+ userId : req . authUser . userId ,
3032 initiatorUserId : req . authUser . userId ,
3133 } , logger ) ;
3234 } ) ;
@@ -42,6 +44,7 @@ module.exports = (app, logger) => {
4244 createEvent ( mapEventTypes [ updated . status ] , {
4345 projectId : updated . id ,
4446 projectName : updated . name ,
47+ userId : req . authUser . userId ,
4548 initiatorUserId : req . authUser . userId ,
4649 } , logger ) ;
4750 } else if (
@@ -52,13 +55,15 @@ module.exports = (app, logger) => {
5255 createEvent ( BUS_API_EVENT . PROJECT_SPECIFICATION_MODIFIED , {
5356 projectId : updated . id ,
5457 projectName : updated . name ,
58+ userId : req . authUser . userId ,
5559 initiatorUserId : req . authUser . userId ,
5660 } , logger ) ;
5761 } else if ( ! _ . isEqual ( original . bookmarks , updated . bookmarks ) ) {
5862 logger . debug ( 'project bookmarks is updated' ) ;
5963 createEvent ( BUS_API_EVENT . PROJECT_LINK_CREATED , {
6064 projectId : updated . id ,
6165 projectName : updated . name ,
66+ userId : req . authUser . userId ,
6267 initiatorUserId : req . authUser . userId ,
6368 } , logger ) ;
6469 }
@@ -166,6 +171,7 @@ module.exports = (app, logger) => {
166171 projectId,
167172 projectName : project . name ,
168173 fileName : attachment . filePath . replace ( / ^ .* [ \\ \/ ] / , '' ) , // eslint-disable-line
174+ userId : req . authUser . userId ,
169175 initiatorUserId : req . authUser . userId ,
170176 } , logger ) ;
171177 } ) . catch ( err => null ) ; // eslint-disable-line no-unused-vars
0 commit comments