fixed file bug for indent issue and param type check

This commit is contained in:
Tony Tam
2013-01-25 20:13:09 -08:00
parent ba2263e6f3
commit f0f6a07a61
2 changed files with 7 additions and 7 deletions

View File

@@ -76,9 +76,9 @@ class OperationView extends Backbone.View
# requires HTML5 compatible browser
bodyParam = new FormData()
# add params
# add params except file
for param in @model.parameters
if param.paramType is 'body'
if param.paramType is 'body' and param.name isnt 'file'
bodyParam.append(param.name, map[param.name])
# add files
@@ -87,10 +87,10 @@ class OperationView extends Backbone.View
console.log(bodyParam)
else
bodyParam = null
for param in @model.parameters
if param.paramType is 'body'
bodyParam = map[param.name]
bodyParam = null
for param in @model.parameters
if param.paramType is 'body'
bodyParam = map[param.name]
log "bodyParam = " + bodyParam