<?php
require_once __DIR__ . '/../../config/session.php';
require_once __DIR__ . '/../../config/db.php';
require_once __DIR__ . '/../../config/response.php';

require_login();

$roles = $pdo->query("SELECT * FROM roles WHERE is_active = 1 ORDER BY id")->fetchAll();
jsonResponse(['success' => true, 'data' => $roles]);