📂Better folder structures and file names in backend

This commit is contained in:
canove
2020-07-08 11:48:11 -03:00
parent c9cc973088
commit b1bed3623e
11 changed files with 55 additions and 68 deletions

View File

@@ -1,13 +1,13 @@
const express = require("express");
const isAuth = require("../middleware/is-auth");
const ContactController = require("../controllers/contact");
const ContactController = require("../controllers/ContactController");
const routes = express.Router();
routes.get("/contacts", isAuth, ContactController.getContacts);
routes.get("/contacts", isAuth, ContactController.index);
// routes.post(ContactController.postCreateContact);
routes.post("/contacts", isAuth, ContactController.createContact);
routes.post("/contacts", isAuth, ContactController.store);
module.exports = routes;