<?php
header("Content-Type: application/json");

require 'auth.php';
authUser();  // check JWT before proceeding

// Fetch users from DB
$users = findQuery("SELECT * FROM tbl_user");

// Return as JSON
echo json_encode($users);
exit;
