Skip to content

Commit

Permalink
fix: leave JSON parsing to express
Browse files Browse the repository at this point in the history
  • Loading branch information
nicosantangelo committed Jul 29, 2019
1 parent 63f3515 commit 12d686f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/server/index.ts
Expand Up @@ -58,10 +58,6 @@ export function extractFromReq(req: Request, param: string): string {
value = req.params[param]
}

if (req.headers['content-type'] === 'application/json') {
value = JSON.parse(value)
}

if (!value) {
throw new Error(`Could not get ${param} from request`)
}
Expand Down

0 comments on commit 12d686f

Please sign in to comment.