1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
letu/sockets/index.js

17 lines
745 B
JavaScript
Raw Normal View History

module.exports = socket => {
console.log("New connection !");
2020-11-03 12:54:40 +01:00
console.log(socket.request.session.user);
if (!socket.request.session.user) {
socket.on("login", require("./login")(socket));
socket.on("register", require("./register")(socket));
socket.on("checkResend", require("./email/checkResend")(socket));
socket.on("forgotPassword", require("./email/forgotPassword")(socket));
socket.on("setPassword", require("./email/setPassword")(socket));
} else {
socket.on("profileEdit", require("./profile/edit")(socket));
2020-11-03 12:54:40 +01:00
socket.on("logout", require("./logout")(socket));
2020-11-24 08:47:13 +01:00
socket.on("agendaGet", require("./get/agendaGet")(socket));
}
socket.emit("connected");
2020-11-24 08:47:13 +01:00
};