mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-17 19:37:02 +00:00
17 lines
491 B
JavaScript
17 lines
491 B
JavaScript
const express = require("express");
|
|
const SessionController = require("../controllers/SessionController");
|
|
const UserController = require("../controllers/UserController");
|
|
const isAuth = require("../middleware/is-auth");
|
|
|
|
const routes = express.Router();
|
|
|
|
routes.post("/signup", UserController.store);
|
|
|
|
routes.post("/login", SessionController.store);
|
|
|
|
routes.get("/check", isAuth, (req, res) => {
|
|
res.status(200).json({ authenticated: true });
|
|
});
|
|
|
|
module.exports = routes;
|