brianschardt / node_rest_api_mysql

MIT License
248 stars 140 forks source link

Removed repeated res.setHeader() because res.json() already sets the proper headers #10

Closed s1moe2 closed 6 years ago

s1moe2 commented 6 years ago

Just a simple cleanup to avoid the repeated repeated res.setHeader('Content-Type', 'application/json'); since ReS/ReE are already using res.json() and it "sends a response (with the correct content-type)", according to the express docs: https://expressjs.com/en/api.html#res.json