You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

23 lines
735 B

const express = require('express');
const router = express.Router();
const clientController = require('../controllers/clientController');
// GET /api/clients - Get all clients
router.get('/', clientController.getAllClients);
// GET /api/clients/stats - Get client statistics
router.get('/stats', clientController.getClientStats);
// GET /api/clients/:id - Get client by ID
router.get('/:id', clientController.getClientById);
// POST /api/clients - Create new client
router.post('/', clientController.createClient);
// PUT /api/clients/:id - Update client
router.put('/:id', clientController.updateClient);
// DELETE /api/clients/:id - Delete client
router.delete('/:id', clientController.deleteClient);
module.exports = router;