Backend folders organize and finshed send audio

This commit is contained in:
canove
2020-07-08 11:19:08 -03:00
parent 87e4537ce2
commit c9cc973088
38 changed files with 61 additions and 21 deletions

View File

@@ -7,9 +7,9 @@ const cors = require("cors");
const sequelize = require("./database/");
const multer = require("multer");
const wBot = require("./controllers/wbot");
const wbotMessageListener = require("./controllers/wbotMessageListener");
const wbotMonitor = require("./controllers/wbotMonitor");
const wBot = require("./libs/wbot");
const wbotMessageListener = require("./services/wbotMessageListener");
const wbotMonitor = require("./services/wbotMonitor");
const messageRoutes = require("./routes/message");
const ContactRoutes = require("./routes/contacts");

View File

@@ -2,7 +2,7 @@ const Contact = require("../models/Contact");
const Message = require("../models/Message");
const Sequelize = require("sequelize");
const { getIO } = require("../libs/socket");
const { getWbot } = require("./wbot");
const { getWbot } = require("../libs/wbot");
exports.getContacts = async (req, res) => {
const { searchParam = "" } = req.query;

View File

@@ -2,7 +2,7 @@ const fs = require("fs");
const Message = require("../models/Message");
const Contact = require("../models/Contact");
const { getIO } = require("../libs/socket");
const { getWbot } = require("./wbot");
const { getWbot } = require("../libs/wbot");
const Sequelize = require("sequelize");
const { MessageMedia } = require("whatsapp-web.js");

View File

@@ -1,6 +1,6 @@
const Whatsapp = require("../models/Whatsapp");
const { getIO } = require("../libs/socket");
const { getWbot, init } = require("./wbot");
const { getWbot, init } = require("../libs/wbot");
exports.getSession = async (req, res, next) => {
const dbSession = await Whatsapp.findOne({ where: { id: 1 } });

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -5,7 +5,7 @@ const path = require("path");
const fs = require("fs");
const { getIO } = require("../libs/socket");
const { getWbot, init } = require("./wbot");
const { getWbot, init } = require("../libs/wbot");
const wbotMessageListener = () => {
const io = getIO();

View File

@@ -2,7 +2,7 @@ const Whatsapp = require("../models/Whatsapp");
const wbotMessageListener = require("./wbotMessageListener");
const { getIO } = require("../libs/socket");
const { getWbot, init } = require("./wbot");
const { getWbot, init } = require("../libs/wbot");
const wbotMonitor = () => {
const io = getIO();