mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 20:29:17 +00:00
feat: added routes to handle whatsapp session
This commit is contained in:
@@ -7,6 +7,7 @@ import contactRoutes from "./contactRoutes";
|
||||
import ticketRoutes from "./ticketRoutes";
|
||||
import whatsappRoutes from "./whatsappRoutes";
|
||||
import messageRoutes from "./messageRoutes";
|
||||
import whatsappSessionRoutes from "./whatsappSessionRoutes";
|
||||
|
||||
const routes = Router();
|
||||
|
||||
@@ -17,5 +18,7 @@ routes.use(contactRoutes);
|
||||
routes.use(ticketRoutes);
|
||||
routes.use(whatsappRoutes);
|
||||
routes.use(messageRoutes);
|
||||
routes.use(messageRoutes);
|
||||
routes.use(whatsappSessionRoutes);
|
||||
|
||||
export default routes;
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
// const express = require("express");
|
||||
// const isAuth = require("../../middleware/is-auth");
|
||||
import { Router } from "express";
|
||||
import isAuth from "../middleware/isAuth";
|
||||
|
||||
// const WhatsAppSessionController = require("../../controllers/WhatsAppSessionController");
|
||||
import WhatsAppSessionController from "../controllers/WhatsAppSessionController";
|
||||
|
||||
// const routes = express.Router();
|
||||
const whatsappSessionRoutes = Router();
|
||||
|
||||
// routes.get(
|
||||
// "/whatsappsession/:whatsappId",
|
||||
// isAuth,
|
||||
// WhatsAppSessionController.show
|
||||
// );
|
||||
whatsappSessionRoutes.post(
|
||||
"/whatsappsession/:whatsappId",
|
||||
isAuth,
|
||||
WhatsAppSessionController.store
|
||||
);
|
||||
|
||||
// routes.delete(
|
||||
// "/whatsappsession/:whatsappId",
|
||||
// isAuth,
|
||||
// WhatsAppSessionController.delete
|
||||
// );
|
||||
whatsappSessionRoutes.delete(
|
||||
"/whatsappsession/:whatsappId",
|
||||
isAuth,
|
||||
WhatsAppSessionController.remove
|
||||
);
|
||||
|
||||
// module.exports = routes;
|
||||
export default whatsappSessionRoutes;
|
||||
|
||||
Reference in New Issue
Block a user