<?php
require_once __DIR__ . "/../services/db.php";

header('Content-Type: application/json');

$conn = db(); // <-- THIS is the missing part

if ($conn) {
    echo json_encode(["db" => "OK"]);
} else {
    echo json_encode([
        "db" => "FAILED",
        "errors" => sqlsrv_errors()
    ]);
}
