File tree 5 files changed +13
-8
lines changed
5 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 1
1
machine :
2
2
3
3
node :
4
- version : 5.9
4
+ version : v5.7.0
5
5
environment :
6
6
DB_MASTER_URL : postgres://ubuntu:@127.0.0.1:5432/circle_test
7
7
# RABBITMQ_URL: amqp://localhost:5672
@@ -14,7 +14,7 @@ dependencies:
14
14
pre :
15
15
- pip install awsebcli
16
16
override :
17
- - npm install --only=dev
17
+ - npm install
18
18
19
19
deployment :
20
20
development :
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ export const EVENT = {
34
34
ROUTING_KEY : {
35
35
PROJECT_MEMBER_ADDED : 'project.member.added' ,
36
36
PROJECT_MEMBER_REMOVED : 'project.member.removed' ,
37
+ PROJECT_MEMBER_UPDATED : 'project.member.updated' ,
37
38
38
39
PROJECT_DRAFT_CREATED : 'project.draft-created' ,
39
40
PROJECT_LAUNCHED : 'project.launched' ,
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ module.exports = [
120
120
let response = _ . cloneDeep ( newAttachment )
121
121
response = _ . omit ( response , [ 'filePath' , 'deletedAt' ] )
122
122
123
- response . url = resp . data . result . content . preSignedURL
123
+ response . downloadUrl = resp . data . result . content . preSignedURL
124
124
res . status ( 201 ) . json ( util . wrapResponse ( req . id , response ) )
125
125
} )
126
126
. catch ( function ( err ) {
Original file line number Diff line number Diff line change @@ -134,10 +134,9 @@ describe('Project Attachments', () => {
134
134
getSpy . should . have . been . calledOnce
135
135
stub . restore ( )
136
136
console . log ( JSON . stringify ( resJson , null , 2 ) )
137
- // resJson.role.should.equal('customer')
138
- // resJson.isPrimary.should.be.truthy
139
- // resJson.projectId.should.equal(project1.id)
140
- // resJson.userId.should.equal(1)
137
+ resJson . title . should . equal ( 'Spec.pdf' )
138
+ resJson . downloadUrl . should . exist
139
+ resJson . projectId . should . equal ( project1 . id )
141
140
done ( )
142
141
} )
143
142
} )
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import Joi from 'joi'
5
5
6
6
import models from '../../models'
7
7
import util from '../../util'
8
- import { PROJECT_MEMBER_ROLE } from '../../constants'
8
+ import { EVENT , PROJECT_MEMBER_ROLE } from '../../constants'
9
9
import { middleware as tcMiddleware } from 'tc-core-library-js'
10
10
import directProject from '../../services/directProject'
11
11
@@ -115,6 +115,11 @@ module.exports = [
115
115
. then ( ( ) => {
116
116
projectMember = projectMember . get ( { plain : true } )
117
117
projectMember = _ . omit ( projectMember , [ 'deletedAt' ] )
118
+ // emit original and updated project information
119
+ req . app . emit ( EVENT . INTERNAL . PROJECT_MEMBER_UPDATED , {
120
+ payload : { original : previousValue , updated : projectMember } ,
121
+ props : { correlationId : req . id }
122
+ } )
118
123
req . log . debug ( 'updated project member' , projectMember )
119
124
res . json ( util . wrapResponse ( req . id , projectMember ) )
120
125
} )
You can’t perform that action at this time.
0 commit comments