Skip to content

Commit

Permalink
feat(todo): can add and delete todos
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Jan 4, 2016
1 parent fcc2616 commit cde8536
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion dist/express-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -61581,7 +61581,7 @@ function expressService (app) {
text.split('\n').forEach(function (line) {
const parts = line.split('=')
if (parts.length === 2) {
obj[parts[0]] = parts[1]
obj[parts[0]] = decodeURIComponent(parts[1].replace(/\+/g, ' '))
}
})
return obj
Expand Down Expand Up @@ -61643,6 +61643,12 @@ function expressService (app) {
'Content-Type': res.get('Content-Type')
}
}
if (res.get('Location')) {
responseOptions.headers.Location = res.get('Location')
}
if (res.get('X-Powered-By')) {
responseOptions.headers['X-Powered-By'] = res.get('X-Powered-By')
}
resolve(new Response(chunk, responseOptions))
}

Expand Down
8 changes: 7 additions & 1 deletion src/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function expressService (app) {
text.split('\n').forEach(function (line) {
const parts = line.split('=')
if (parts.length === 2) {
obj[parts[0]] = parts[1]
obj[parts[0]] = decodeURIComponent(parts[1].replace(/\+/g, ' '))
}
})
return obj
Expand Down Expand Up @@ -103,6 +103,12 @@ function expressService (app) {
'Content-Type': res.get('Content-Type')
}
}
if (res.get('Location')) {
responseOptions.headers.Location = res.get('Location')
}
if (res.get('X-Powered-By')) {
responseOptions.headers['X-Powered-By'] = res.get('X-Powered-By')
}
resolve(new Response(chunk, responseOptions))
}

Expand Down

0 comments on commit cde8536

Please sign in to comment.