Skip to content

Commit 46932a3

Browse files
author
Parth Shah
committed
fixes #23 and fixes #24
1 parent 3474920 commit 46932a3

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/routes/attachments/create.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ module.exports = [
120120
let response = _.cloneDeep(newAttachment)
121121
response = _.omit(response, ['filePath', 'deletedAt'])
122122

123-
response.url = resp.data.result.content.preSignedURL
123+
response.downloadUrl = resp.data.result.content.preSignedURL
124124
res.status(201).json(util.wrapResponse(req.id, response))
125125
})
126126
.catch(function(err) {

src/routes/attachments/create.spec.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,9 @@ describe('Project Attachments', () => {
134134
getSpy.should.have.been.calledOnce
135135
stub.restore()
136136
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)
141140
done()
142141
})
143142
})

0 commit comments

Comments
 (0)