const express = require("express");
const router = express.Router();
const authmiddleware = require("../middleware/authmiddleware");
const {
  register,
  login,
  checkToken,
} = require("../controllers/authController");

router.post("/register", register);
router.post("/login", login);
router.get("/protected", authmiddleware, checkToken);

module.exports = router;
