From 79d330ae47d2505a720723726eb401b39ff542e5 Mon Sep 17 00:00:00 2001 From: flifloo Date: Sun, 31 May 2020 22:47:20 +0200 Subject: [PATCH] Socket organization by folder --- sockets/{ => add}/addCommand.js | 4 ++-- sockets/{ => add}/addUser.js | 2 +- sockets/index.js | 32 ++++++++++++++-------------- sockets/{ => list}/listCommand.js | 4 ++-- sockets/{ => list}/listDessert.js | 4 ++-- sockets/{ => list}/listDish.js | 4 ++-- sockets/{ => list}/listDrink.js | 4 ++-- sockets/{ => list}/listIngredient.js | 4 ++-- sockets/{ => list}/listSauce.js | 4 ++-- sockets/{ => list}/listService.js | 2 +- sockets/{ => list}/listUser.js | 2 +- sockets/{ => set}/setDessert.js | 4 ++-- sockets/{ => set}/setDish.js | 4 ++-- sockets/{ => set}/setDrink.js | 4 ++-- sockets/{ => set}/setIngredient.js | 4 ++-- sockets/{ => set}/setSauce.js | 4 ++-- sockets/{ => set}/setService.js | 2 +- 17 files changed, 44 insertions(+), 44 deletions(-) rename sockets/{ => add}/addCommand.js (95%) rename sockets/{ => add}/addUser.js (95%) rename sockets/{ => list}/listCommand.js (88%) rename sockets/{ => list}/listDessert.js (79%) rename sockets/{ => list}/listDish.js (78%) rename sockets/{ => list}/listDrink.js (78%) rename sockets/{ => list}/listIngredient.js (80%) rename sockets/{ => list}/listSauce.js (78%) rename sockets/{ => list}/listService.js (95%) rename sockets/{ => list}/listUser.js (90%) rename sockets/{ => set}/setDessert.js (87%) rename sockets/{ => set}/setDish.js (87%) rename sockets/{ => set}/setDrink.js (87%) rename sockets/{ => set}/setIngredient.js (88%) rename sockets/{ => set}/setSauce.js (87%) rename sockets/{ => set}/setService.js (94%) diff --git a/sockets/addCommand.js b/sockets/add/addCommand.js similarity index 95% rename from sockets/addCommand.js rename to sockets/add/addCommand.js index f258fa8..13ce04f 100644 --- a/sockets/addCommand.js +++ b/sockets/add/addCommand.js @@ -1,5 +1,5 @@ -const models = require("../models"); -const utils = require("./utils"); +const models = require("../../models"); +const utils = require("../utils"); module.exports = socket => { return async (data) => { diff --git a/sockets/addUser.js b/sockets/add/addUser.js similarity index 95% rename from sockets/addUser.js rename to sockets/add/addUser.js index 05d610e..dc94a86 100644 --- a/sockets/addUser.js +++ b/sockets/add/addUser.js @@ -1,4 +1,4 @@ -const models = require("../models"); +const models = require("../../models"); module.exports = socket => { return async (data) => { diff --git a/sockets/index.js b/sockets/index.js index acb15fa..5bfb658 100644 --- a/sockets/index.js +++ b/sockets/index.js @@ -1,19 +1,19 @@ -const listCommand = require("./listCommand"); -const listDish = require("./listDish"); -const listIngredient = require("./listIngredient"); -const listSauce = require("./listSauce"); -const listDrink = require("./listDrink"); -const listDessert = require("./listDessert"); -const listUser = require("./listUser"); -const listService = require("./listService"); -const addCommand = require("./addCommand"); -const addUSer = require("./addUser"); -const setDish = require("./setDish"); -const setIngredient = require("./setIngredient"); -const setSauce = require("./setSauce"); -const setDrink = require("./setDrink"); -const setDessert = require("./setDessert"); -const setService = require("./setService"); +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"); +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"); const giveCommand = require("./giveCommand"); const WIPCommand = require("./WIPCommand"); const doneCommand = require("./doneCommand"); diff --git a/sockets/listCommand.js b/sockets/list/listCommand.js similarity index 88% rename from sockets/listCommand.js rename to sockets/list/listCommand.js index c32d20f..f4d3333 100644 --- a/sockets/listCommand.js +++ b/sockets/list/listCommand.js @@ -1,5 +1,5 @@ -const models = require("../models"); -const utils = require("./utils"); +const models = require("../../models"); +const utils = require("../utils"); module.exports = socket => { return async () => { diff --git a/sockets/listDessert.js b/sockets/list/listDessert.js similarity index 79% rename from sockets/listDessert.js rename to sockets/list/listDessert.js index e8479fb..bc54a0f 100644 --- a/sockets/listDessert.js +++ b/sockets/list/listDessert.js @@ -1,5 +1,5 @@ -const models = require("../models"); -const utils = require("./utils"); +const models = require("../../models"); +const utils = require("../utils"); module.exports = socket => { return async () => { diff --git a/sockets/listDish.js b/sockets/list/listDish.js similarity index 78% rename from sockets/listDish.js rename to sockets/list/listDish.js index caf26e1..c8d6649 100644 --- a/sockets/listDish.js +++ b/sockets/list/listDish.js @@ -1,5 +1,5 @@ -const models = require("../models"); -const utils = require("./utils"); +const models = require("../../models"); +const utils = require("../utils"); module.exports = socket => { return async () => { diff --git a/sockets/listDrink.js b/sockets/list/listDrink.js similarity index 78% rename from sockets/listDrink.js rename to sockets/list/listDrink.js index ce1113e..355e68b 100644 --- a/sockets/listDrink.js +++ b/sockets/list/listDrink.js @@ -1,5 +1,5 @@ -const models = require("../models"); -const utils = require("./utils"); +const models = require("../../models"); +const utils = require("../utils"); module.exports = socket => { return async () => { diff --git a/sockets/listIngredient.js b/sockets/list/listIngredient.js similarity index 80% rename from sockets/listIngredient.js rename to sockets/list/listIngredient.js index 5c69774..4bbc82b 100644 --- a/sockets/listIngredient.js +++ b/sockets/list/listIngredient.js @@ -1,5 +1,5 @@ -const models = require("../models"); -const utils = require("./utils"); +const models = require("../../models"); +const utils = require("../utils"); module.exports = socket => { return async () => { diff --git a/sockets/listSauce.js b/sockets/list/listSauce.js similarity index 78% rename from sockets/listSauce.js rename to sockets/list/listSauce.js index e894b56..25dadf0 100644 --- a/sockets/listSauce.js +++ b/sockets/list/listSauce.js @@ -1,5 +1,5 @@ -const models = require("../models"); -const utils = require("./utils"); +const models = require("../../models"); +const utils = require("../utils"); module.exports = socket => { return async () => { diff --git a/sockets/listService.js b/sockets/list/listService.js similarity index 95% rename from sockets/listService.js rename to sockets/list/listService.js index bc9c324..14894d0 100644 --- a/sockets/listService.js +++ b/sockets/list/listService.js @@ -1,4 +1,4 @@ -const models = require("../models"); +const models = require("../../models"); module.exports = socket => { return async () => { diff --git a/sockets/listUser.js b/sockets/list/listUser.js similarity index 90% rename from sockets/listUser.js rename to sockets/list/listUser.js index 4183822..a8b205e 100644 --- a/sockets/listUser.js +++ b/sockets/list/listUser.js @@ -1,4 +1,4 @@ -const models = require("../models"); +const models = require("../../models"); module.exports = socket => { return async data => { diff --git a/sockets/setDessert.js b/sockets/set/setDessert.js similarity index 87% rename from sockets/setDessert.js rename to sockets/set/setDessert.js index ac8172e..20f5cae 100644 --- a/sockets/setDessert.js +++ b/sockets/set/setDessert.js @@ -1,5 +1,5 @@ -const models = require("../models"); -const utils = require("./utils"); +const models = require("../../models"); +const utils = require("../utils"); module.exports = socket => { return async (data) => { diff --git a/sockets/setDish.js b/sockets/set/setDish.js similarity index 87% rename from sockets/setDish.js rename to sockets/set/setDish.js index 3f08dad..4cb66f4 100644 --- a/sockets/setDish.js +++ b/sockets/set/setDish.js @@ -1,5 +1,5 @@ -const models = require("../models"); -const utils = require("./utils"); +const models = require("../../models"); +const utils = require("../utils"); module.exports = socket => { return async (data) => { diff --git a/sockets/setDrink.js b/sockets/set/setDrink.js similarity index 87% rename from sockets/setDrink.js rename to sockets/set/setDrink.js index 9ef1638..c537e3c 100644 --- a/sockets/setDrink.js +++ b/sockets/set/setDrink.js @@ -1,5 +1,5 @@ -const models = require("../models"); -const utils = require("./utils"); +const models = require("../../models"); +const utils = require("../utils"); module.exports = socket => { return async (data) => { diff --git a/sockets/setIngredient.js b/sockets/set/setIngredient.js similarity index 88% rename from sockets/setIngredient.js rename to sockets/set/setIngredient.js index 8e47e61..a6026af 100644 --- a/sockets/setIngredient.js +++ b/sockets/set/setIngredient.js @@ -1,5 +1,5 @@ -const models = require("../models"); -const utils = require("./utils"); +const models = require("../../models"); +const utils = require("../utils"); module.exports = socket => { return async (data) => { diff --git a/sockets/setSauce.js b/sockets/set/setSauce.js similarity index 87% rename from sockets/setSauce.js rename to sockets/set/setSauce.js index 3edcddd..be706c7 100644 --- a/sockets/setSauce.js +++ b/sockets/set/setSauce.js @@ -1,5 +1,5 @@ -const models = require("../models"); -const utils = require("./utils"); +const models = require("../../models"); +const utils = require("../utils"); module.exports = socket => { return async (data) => { diff --git a/sockets/setService.js b/sockets/set/setService.js similarity index 94% rename from sockets/setService.js rename to sockets/set/setService.js index f28eb6f..84c7e4d 100644 --- a/sockets/setService.js +++ b/sockets/set/setService.js @@ -1,4 +1,4 @@ -const models = require("../models"); +const models = require("../../models"); module.exports = socket => { return async (data) => {