@@ -14,6 +14,7 @@ const mapEventTypes = {
14
14
[ PROJECT_STATUS . COMPLETED ] : BUS_API_EVENT . PROJECT_COMPLETED ,
15
15
[ PROJECT_STATUS . CANCELLED ] : BUS_API_EVENT . PROJECT_CANCELED ,
16
16
[ PROJECT_STATUS . PAUSED ] : BUS_API_EVENT . PROJECT_PAUSED ,
17
+ [ PROJECT_STATUS . ACTIVE ] : BUS_API_EVENT . PROJECT_ACTIVE ,
17
18
} ;
18
19
19
20
module . exports = ( app , logger ) => {
@@ -27,6 +28,7 @@ module.exports = (app, logger) => {
27
28
createEvent ( BUS_API_EVENT . PROJECT_CREATED , {
28
29
projectId : project . id ,
29
30
projectName : project . name ,
31
+ userId : req . authUser . userId ,
30
32
initiatorUserId : req . authUser . userId ,
31
33
} , logger ) ;
32
34
} ) ;
@@ -42,6 +44,7 @@ module.exports = (app, logger) => {
42
44
createEvent ( mapEventTypes [ updated . status ] , {
43
45
projectId : updated . id ,
44
46
projectName : updated . name ,
47
+ userId : req . authUser . userId ,
45
48
initiatorUserId : req . authUser . userId ,
46
49
} , logger ) ;
47
50
} else if (
@@ -52,13 +55,15 @@ module.exports = (app, logger) => {
52
55
createEvent ( BUS_API_EVENT . PROJECT_SPECIFICATION_MODIFIED , {
53
56
projectId : updated . id ,
54
57
projectName : updated . name ,
58
+ userId : req . authUser . userId ,
55
59
initiatorUserId : req . authUser . userId ,
56
60
} , logger ) ;
57
61
} else if ( ! _ . isEqual ( original . bookmarks , updated . bookmarks ) ) {
58
62
logger . debug ( 'project bookmarks is updated' ) ;
59
63
createEvent ( BUS_API_EVENT . PROJECT_LINK_CREATED , {
60
64
projectId : updated . id ,
61
65
projectName : updated . name ,
66
+ userId : req . authUser . userId ,
62
67
initiatorUserId : req . authUser . userId ,
63
68
} , logger ) ;
64
69
}
@@ -166,6 +171,7 @@ module.exports = (app, logger) => {
166
171
projectId,
167
172
projectName : project . name ,
168
173
fileName : attachment . filePath . replace ( / ^ .* [ \\ \/ ] / , '' ) , // eslint-disable-line
174
+ userId : req . authUser . userId ,
169
175
initiatorUserId : req . authUser . userId ,
170
176
} , logger ) ;
171
177
} ) . catch ( err => null ) ; // eslint-disable-line no-unused-vars
0 commit comments