You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
482 B
JavaScript
18 lines
482 B
JavaScript
const express = require("express")
|
|
const router = express.Router()
|
|
const userController = require("../controllers/user")
|
|
const auth = require("../auth");
|
|
|
|
const { authenticateToken } = auth;
|
|
|
|
// User registration route
|
|
router.post("/register", userController.registerUser)
|
|
|
|
// User authentication route
|
|
router.post("/login", userController.authenticateUser)
|
|
|
|
// Update user data route
|
|
router.put("/update", authenticateToken, userController.updateUserData)
|
|
|
|
module.exports = router
|