const response = await fetch('/api/orders');
if (!response.ok) throw new Error('Не удалось загрузить заявки');
const orders = await response.json();
console.log(orders.length);