mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 12:19:16 +00:00
All models using classes and sequelize migrations
This commit is contained in:
@@ -5,8 +5,8 @@ const MessageController = require("../controllers/MessageController");
|
||||
|
||||
const routes = express.Router();
|
||||
|
||||
routes.get("/messages/:contactId", isAuth, MessageController.index);
|
||||
routes.get("/messages/:ticketId", isAuth, MessageController.index);
|
||||
|
||||
routes.post("/messages/:contactId", isAuth, MessageController.store);
|
||||
routes.post("/messages/:ticketId", isAuth, MessageController.store);
|
||||
|
||||
module.exports = routes;
|
||||
|
||||
14
backend/src/routes/tickets.js
Normal file
14
backend/src/routes/tickets.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const express = require("express");
|
||||
const isAuth = require("../middleware/is-auth");
|
||||
|
||||
const TicketController = require("../controllers/TicketController");
|
||||
|
||||
const routes = express.Router();
|
||||
|
||||
routes.get("/tickets", isAuth, TicketController.index);
|
||||
|
||||
routes.post("/tickets", isAuth, TicketController.store);
|
||||
|
||||
routes.put("/tickets/:ticketId", isAuth, TicketController.update);
|
||||
|
||||
module.exports = routes;
|
||||
@@ -1,12 +1,17 @@
|
||||
const express = require("express");
|
||||
const isAuth = require("../middleware/is-auth");
|
||||
|
||||
const WhatsappController = require("../controllers/whatsapp");
|
||||
const WhatsAppSessionController = require("../controllers/WhatsAppSessionController");
|
||||
|
||||
const routes = express.Router();
|
||||
|
||||
routes.get("/whatsapp/session", isAuth, WhatsappController.getSession);
|
||||
routes.get(
|
||||
"/whatsapp/session/:sessionId",
|
||||
isAuth,
|
||||
WhatsAppSessionController.show
|
||||
);
|
||||
|
||||
routes.get("/whatsapp/contacts", isAuth, WhatsappController.getContacts); // fetch contacts in user cellphone, not in use
|
||||
// fetch contacts in user cellphone, not in use
|
||||
// routes.get("/whatsapp/contacts", isAuth, WhatsappController.getContacts);
|
||||
|
||||
module.exports = routes;
|
||||
|
||||
Reference in New Issue
Block a user