changed ticket creation and list to typescript

This commit is contained in:
canove
2020-09-19 21:00:49 -03:00
parent 5dda3aabaf
commit 1d0bbda00d
16 changed files with 473 additions and 81 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." });
// };