TheWoodenMan/behavioural-recruitment

/questions/addone Works but doesn't return a positive back to postman

Closed this issue · 1 comments

on using postman to submit the request:

/questions/addone

with the body of a question.

The question correctly updates and populates with the json in the body.

but times out on reply to postman, postman just stays on the "sending request" screen with no update.

Here is the error message in the console:

TypeError: res.json is not a function
    at C:\Users\andyn\OneDrive\Documents\GitHub\behavioural-recruitment\server.js:77:8
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Fixed by #11
The res was being overwritten by the result of the previous promise