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 = module.exports = BucketController =
getFile: (req, res)-> getFile: (req, res)->
{bucket} = req {bucket} = req.params
key = req[0] key = req.params[0]
{format, style} = req.query {format, style} = req.query
credentials = settings.filestore.s3&[bucket] credentials = settings.filestore.s3&[bucket]
options = { options = {

View file

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