2020-05-31 22:47:20 +02:00
|
|
|
const listCommand = require("./list/listCommand");
|
|
|
|
const listDish = require("./list/listDish");
|
|
|
|
const listIngredient = require("./list/listIngredient");
|
|
|
|
const listSauce = require("./list/listSauce");
|
|
|
|
const listDrink = require("./list/listDrink");
|
|
|
|
const listDessert = require("./list/listDessert");
|
|
|
|
const listUser = require("./list/listUser");
|
|
|
|
const listService = require("./list/listService");
|
|
|
|
const addCommand = require("./add/addCommand");
|
|
|
|
const addUSer = require("./add/addUser");
|
2020-06-01 14:06:35 +02:00
|
|
|
const addDish = require("./add/addDish");
|
|
|
|
const addIngredient = require("./add/addIngredient");
|
|
|
|
const addSauce = require("./add/addSauce");
|
|
|
|
const addDrink = require("./add/addDrink");
|
|
|
|
const addDessert = require("./add/addDessert");
|
2020-05-31 22:47:20 +02:00
|
|
|
const setDish = require("./set/setDish");
|
|
|
|
const setIngredient = require("./set/setIngredient");
|
|
|
|
const setSauce = require("./set/setSauce");
|
|
|
|
const setDrink = require("./set/setDrink");
|
|
|
|
const setDessert = require("./set/setDessert");
|
|
|
|
const setService = require("./set/setService");
|
2020-05-31 23:19:00 +02:00
|
|
|
const removeDish = require("./remove/removeDish");
|
|
|
|
const removeIngredient = require("./remove/removeIngredient");
|
|
|
|
const removeSauce = require("./remove/removeSauce");
|
|
|
|
const removeDrink = require("./remove/removeDrink");
|
|
|
|
const removeDessert = require("./remove/removeDessert");
|
2020-05-30 15:42:04 +02:00
|
|
|
const giveCommand = require("./giveCommand");
|
2020-05-30 21:40:36 +02:00
|
|
|
const WIPCommand = require("./WIPCommand");
|
|
|
|
const doneCommand = require("./doneCommand");
|
2020-05-30 15:42:04 +02:00
|
|
|
const errorCommand = require("./errorCommand");
|
|
|
|
const clearCommand = require("./clearCommand");
|
2020-05-30 16:48:50 +02:00
|
|
|
const price = require("./price")
|
2020-05-29 19:44:12 +02:00
|
|
|
|
|
|
|
module.exports = socket => {
|
|
|
|
socket.on("list command", listCommand(socket));
|
|
|
|
socket.on("list dish", listDish(socket));
|
|
|
|
socket.on("list ingredient", listIngredient(socket));
|
|
|
|
socket.on("list sauce", listSauce(socket));
|
|
|
|
socket.on("list drink", listDrink(socket));
|
|
|
|
socket.on("list dessert", listDessert(socket));
|
2020-05-30 15:42:04 +02:00
|
|
|
socket.on("list user", listUser(socket));
|
2020-05-30 18:47:39 +02:00
|
|
|
socket.on("list service", listService(socket));
|
2020-05-29 19:44:12 +02:00
|
|
|
socket.on("add command", addCommand(socket));
|
2020-05-30 15:42:04 +02:00
|
|
|
socket.on("add user", addUSer(socket));
|
2020-06-01 14:06:35 +02:00
|
|
|
socket.on("add dish", addDish(socket));
|
|
|
|
socket.on("add ingredient", addIngredient(socket));
|
|
|
|
socket.on("add sauce", addSauce(socket));
|
|
|
|
socket.on("add drink", addDrink(socket));
|
|
|
|
socket.on("add dessert", addDessert(socket));
|
2020-05-31 21:27:04 +02:00
|
|
|
socket.on("set dish", setDish(socket));
|
|
|
|
socket.on("set ingredient", setIngredient(socket));
|
|
|
|
socket.on("set sauce", setSauce(socket));
|
|
|
|
socket.on("set drink", setDrink(socket));
|
|
|
|
socket.on("set dessert", setDessert(socket));
|
2020-05-30 18:47:39 +02:00
|
|
|
socket.on("set service", setService(socket));
|
2020-05-31 23:19:00 +02:00
|
|
|
socket.on("remove dish", removeDish(socket));
|
|
|
|
socket.on("remove ingredient", removeIngredient(socket));
|
|
|
|
socket.on("remove sauce", removeSauce(socket));
|
|
|
|
socket.on("remove drink", removeDrink(socket));
|
|
|
|
socket.on("remove dessert", removeDessert(socket));
|
2020-05-29 21:47:40 +02:00
|
|
|
socket.on("give command", giveCommand(socket));
|
2020-05-30 21:40:36 +02:00
|
|
|
socket.on("WIP command", WIPCommand(socket));
|
|
|
|
socket.on("done command", doneCommand(socket));
|
2020-05-29 21:47:40 +02:00
|
|
|
socket.on("error command", errorCommand(socket));
|
|
|
|
socket.on("clear command", clearCommand(socket));
|
2020-05-30 16:48:50 +02:00
|
|
|
socket.on("price", price(socket));
|
2020-05-29 19:44:12 +02:00
|
|
|
console.log("New connection !");
|
|
|
|
socket.emit("connected");
|
|
|
|
}
|