Archived
1
0
Fork 0

Some ; and socket emit internal error fix

This commit is contained in:
Ethanell 2020-05-30 15:43:24 +02:00
parent 8a7a137def
commit 07e3e9dbbf
10 changed files with 18 additions and 18 deletions

View file

@ -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) => {
@ -33,7 +33,7 @@ module.exports = socket => {
socket.emit("new command", send);
socket.broadcast.emit("new command", send);
} catch (e) {
socket.emit("error");
socket.emit("internal error");
console.error(e);
}
}

View file

@ -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) => {
@ -18,7 +18,7 @@ module.exports = socket => {
socket.emit("clear command", data);
socket.broadcast.emit("clear command", data);
} catch (e) {
socket.emit("error");
socket.emit("internal error");
console.error(e);
}
}

View file

@ -1,4 +1,4 @@
const models = require("../models")
const models = require("../models");
module.exports = socket => {
return async (data) => {
@ -13,7 +13,7 @@ module.exports = socket => {
socket.emit("error command", data);
socket.broadcast.emit("error command", data);
} catch (e) {
socket.emit("error");
socket.emit("internal error");
console.error(e);
}
}

View file

@ -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) => {
@ -17,7 +17,7 @@ module.exports = socket => {
socket.emit("give command", data);
socket.broadcast.emit("give command", data);
} catch (e) {
socket.emit("error");
socket.emit("internal error");
console.error(e);
}
}

View file

@ -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 () => {

View file

@ -1,4 +1,4 @@
const models = require("../models")
const models = require("../models");
module.exports = socket => {
return async () => {

View file

@ -1,4 +1,4 @@
const models = require("../models")
const models = require("../models");
module.exports = socket => {
return async () => {

View file

@ -1,4 +1,4 @@
const models = require("../models")
const models = require("../models");
module.exports = socket => {
return async () => {

View file

@ -1,4 +1,4 @@
const models = require("../models")
const models = require("../models");
module.exports = socket => {
return async () => {

View file

@ -1,4 +1,4 @@
const models = require("../models")
const models = require("../models");
module.exports = socket => {
return async () => {