]> git.cworth.org Git - lmno-server/commitdiff
Send a response in the implementation of the '/reset' endpoint
authorCarl Worth <cworth@cworth.org>
Fri, 26 Jun 2020 14:30:38 +0000 (07:30 -0700)
committerCarl Worth <cworth@cworth.org>
Fri, 26 Jun 2020 14:30:38 +0000 (07:30 -0700)
Without this, a client could hang forever waiting for the server to
say something, (which is exactly what the test suite was doing without
this fix).

empathy.js

index 4b7b5a9d3b9ee1f25c921240790e7608a2d282bc..5c2bd18d2b86ff6dd11f29778f4aca7925a28f03 100644 (file)
@@ -550,6 +550,8 @@ router.post('/end-judging/:prompt_id([0-9]+)', (request, response) => {
 router.post('/reset', (request, response) => {
   const game = request.game;
   game.reset();
+
+  response.send('');
 });
 
 Empathy.meta = {