import express from 'express';
import { createLogin, getLoginByClient, updateLogin } from '../controllers/loginController.js';
import { requireAuth, requireRole } from '../middleware/auth.js';

const router = express.Router();

router.post('/', requireAuth, requireRole('SUPER_ADMIN', 'CLIENT_ADMIN'), createLogin);
router.patch('/', requireAuth, requireRole('SUPER_ADMIN', 'CLIENT_ADMIN'), updateLogin);
router.get('/client/:client_id', requireAuth, getLoginByClient);

export default router;
