Fixed problem with all response types returning 200 OK

Passed the code variable into the res.send method to fix it.