const express = require("express");
const { registerUser,registerWithPhone, loginUser, currentUser } = require("../controllers/usersController");
const validateToken = require("../middleware/validateTokenHandler");
const validateCookieToken = require("../middleware/cookieTokenHandler");

const router = express.Router();
router.post("/register", registerWithPhone);
router.post("/login", loginUser);
router.get("/current", validateToken ,currentUser);
router.get("/current1", validateCookieToken ,currentUser);

module.exports = router;