diff --git a/src/api/index.js b/src/api/index.js index 82e3f1a..2fd6a8d 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -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; };