mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-21 05:09:18 +00:00
changed contacts routes to typescript
This commit is contained in:
21
backend/src/routes/contactRoutes.ts
Normal file
21
backend/src/routes/contactRoutes.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import express from "express";
|
||||
import isAuth from "../middleware/isAuth";
|
||||
|
||||
import * as ContactController from "../controllers/ContactController";
|
||||
// import ImportPhoneContactsController from "../controllers/ImportPhoneContactsController";
|
||||
|
||||
const contactRoutes = express.Router();
|
||||
|
||||
// contactRoutes.post("/contacts/import", isAuth, ImportPhoneContactsController.store);
|
||||
|
||||
contactRoutes.get("/contacts", isAuth, ContactController.index);
|
||||
|
||||
contactRoutes.get("/contacts/:contactId", isAuth, ContactController.show);
|
||||
|
||||
contactRoutes.post("/contacts", isAuth, ContactController.store);
|
||||
|
||||
contactRoutes.put("/contacts/:contactId", isAuth, ContactController.update);
|
||||
|
||||
contactRoutes.delete("/contacts/:contactId", isAuth, ContactController.remove);
|
||||
|
||||
export default contactRoutes;
|
||||
Reference in New Issue
Block a user