If we just do the numeric sendStatus(200) then node goes and sends a
response with a body of "OK" rather than something empty.
I don't necessarily want that, (and I notice that when I have spurious
"OK" strings cluttering up my test-suite output).
const prompt_id = parseInt(request.params.prompt_id, 10);
if (game.toggle_vote(prompt_id, request.session.id))
- response.sendStatus(200);
+ response.send('');
else
response.sendStatus(404);
});
const prompt_id = parseInt(request.params.prompt_id, 10);
if (game.start(prompt_id))
- response.sendStatus(200);
+ response.send('');
else
response.sendStatus(404);
});