<?php
require_once __DIR__ . '/config.php';
require_auth();

if ($_SERVER['REQUEST_METHOD'] !== 'GET') {
    respond(['error' => 'Method not allowed'], 405);
}

$db = get_db();
respond($db->query('SELECT * FROM suppliers ORDER BY name')->fetchAll());
