mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 20:29:17 +00:00
22 lines
745 B
JavaScript
22 lines
745 B
JavaScript
const express = require("express");
|
|
const isAuth = require("../middleware/is-auth");
|
|
|
|
const ContactController = require("../controllers/ContactController");
|
|
const ImportPhoneContactsController = require("../controllers/ImportPhoneContactsController");
|
|
|
|
const routes = express.Router();
|
|
|
|
routes.post("/contacts/import", isAuth, ImportPhoneContactsController.store);
|
|
|
|
routes.get("/contacts", isAuth, ContactController.index);
|
|
|
|
routes.get("/contacts/:contactId", isAuth, ContactController.show);
|
|
|
|
routes.post("/contacts", isAuth, ContactController.store);
|
|
|
|
routes.put("/contacts/:contactId", isAuth, ContactController.update);
|
|
|
|
routes.delete("/contacts/:contactId", isAuth, ContactController.delete);
|
|
|
|
module.exports = routes;
|