users.routes.js 483 B

123456789101112
  1. import express from 'express';
  2. import { getAllUsers, getUsersFromQuery, getUserById, updateUserMetadata, updateUser, deleteUser } from "../controllers/users.controller.js";
  3. const router = express.Router();
  4. router.get('/fromQuery/:query', getUsersFromQuery);
  5. router.get('/all', getAllUsers);
  6. router.get('/byId/:id', getUserById);
  7. router.put('/updateMetadata/:id', updateUserMetadata);
  8. router.put('/update/:id', updateUser);
  9. router.delete('/:id', deleteUser);
  10. export default router;