Skip to content

Commit

Permalink
Added reset path
Browse files Browse the repository at this point in the history
  • Loading branch information
Neglexis committed Dec 18, 2018
1 parent 4a10080 commit 96a36b1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,14 @@ export default ({ config, db }) => {
res.json({ version });
});

api.post("/reset", (req, res) => {
players = [];

pusher.trigger("buzzer-channel", "players-update", {
message: players
});
res.json({ version });
});

return api;
};

0 comments on commit 96a36b1

Please sign in to comment.