const express = require('express');
const router = express.Router();
const userController = require('../controllers/userController'); // Make sure the path is correct based on your file structure

// Create a new user
router.post('', userController.createUser);

// Get all users
router.get('', userController.getAllUsers);

router.get('/getByPasscode', userController.getUserByPasscode1);
// Get a single user by ID
router.get('/:id', userController.getUserById);

// Update a user by ID
router.put('/:id', userController.updateUser);

// Delete a user by ID
router.delete('/:id', userController.deleteUser);





module.exports = router;
