fix(integrations): отдавать bindings в ответе sync для VPS Tracker
Build and Push CFDM Docker Image / build-and-push (push) Successful in 1m50s
Build and Push CFDM Docker Image / create-release (push) Skipped
Build and Push CFDM Docker Image / update-wiki (push) Successful in 6s

Ручной sync работает через pull: VPS Tracker получает bindings в ответе и не зависит от обратного push. Уточнены сообщения об ошибках сети.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-08-01 00:36:04 +07:00
co-authored by Cursor
parent 60da2b9032
commit 19620c0803
2 changed files with 17 additions and 13 deletions
+4 -2
View File
@@ -145,19 +145,21 @@ export async function syncAllToVpsTracker(db: Db): Promise<{
body: JSON.stringify({ bindings, fullSync: true }),
});
if (!res.ok) {
const detail = await res.text();
return {
ok: false,
count: 0,
error: `HTTP ${res.status}: ${await res.text()}`,
error: `VPS Tracker ${baseUrl} ответил HTTP ${res.status}: ${detail}`,
};
}
touchVpsTrackerSync(db);
return { ok: true, count: bindings.length };
} catch (err) {
const raw = err instanceof Error ? err.message : "Ошибка сети";
return {
ok: false,
count: 0,
error: err instanceof Error ? err.message : "Ошибка сети",
error: `Не удалось отправить данные в VPS Tracker (${baseUrl}): ${raw}`,
};
}
}