<?php
require_once __DIR__ . '/../_pdo_db_connect.php';
require_once __DIR__ . '/../_response.php';
require_once __DIR__ . '/../middleware/auth_check.php';
$payload = require_auth();
$id = (int)($_GET['id'] ?? 0);
if (!$id) json_res(['error'=>'missing_id'],400);
$pdo = get_db();
$stmt = $pdo->prepare('SELECT * FROM sd_customers WHERE id=? LIMIT 1');
$stmt->execute([$id]);
$row = $stmt->fetch();
if (!$row) json_res(['error'=>'not_found'],404);
json_res(['data'=>$row]);
