finished user store in typscript

This commit is contained in:
canove
2020-09-14 18:54:36 -03:00
parent eba3553a2d
commit 7f33e33078
29 changed files with 260 additions and 133 deletions

View File

@@ -0,0 +1,32 @@
// const Whatsapp = require("../models/Whatsapp");
// const { getIO } = require("../libs/socket");
// const { getWbot, initWbot, removeWbot } = require("../libs/wbot");
// const wbotMessageListener = require("../services/wbotMessageListener");
// const wbotMonitor = require("../services/wbotMonitor");
// exports.show = async (req, res) => {
// const { whatsappId } = req.params;
// const dbSession = await Whatsapp.findByPk(whatsappId);
// if (!dbSession) {
// return res.status(200).json({ message: "Session not found" });
// }
// return res.status(200).json(dbSession);
// };
// exports.delete = async (req, res) => {
// const { whatsappId } = req.params;
// const dbSession = await Whatsapp.findByPk(whatsappId);
// if (!dbSession) {
// return res.status(404).json({ message: "Session not found" });
// }
// const wbot = getWbot(dbSession.id);
// wbot.logout();
// return res.status(200).json({ message: "Session disconnected." });
// };