Amend: fix params retrieval

This commit is contained in:
Michael Mazour 2018-07-04 12:11:09 +01:00
parent ece650741a
commit cfbf0d81ba
2 changed files with 5 additions and 4 deletions

View file

@ -7,8 +7,8 @@ Errors = require('./Errors')
module.exports = BucketController =
getFile: (req, res)->
{bucket} = req
key = req[0]
{bucket} = req.params
key = req.params[0]
{format, style} = req.query
credentials = settings.filestore.s3&[bucket]
options = {

View file

@ -43,9 +43,10 @@ describe "BucketController", ->
@bucket = "user_files"
@key = "#{@project_id}/#{@file_id}"
@req =
bucket:@bucket
0:@key
query:{}
params:
bucket: @bucket
0: @key
headers: {}
@res =
setHeader: ->