OpenDeck/sockets/getDeck.js

11 lines
212 B
JavaScript
Raw Normal View History

2021-03-08 15:22:03 +01:00
const db = require("../db.json");
2021-03-08 14:16:18 +01:00
module.exports = socket => {
2021-03-08 15:22:03 +01:00
return name => {
if (!name)
name = "default";
socket.emit("getDeck", {name: name, data: db.decks[name]});
2021-03-08 14:16:18 +01:00
}
};