qbo_auth: инкрементальная загрузка зеркала через QuickBooks CDC (полная раз в 7 дней, при первом запуске, full=1 и переполнении лимита)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -50,7 +50,7 @@ export function buildApi(auth: QboAuth, token: string, sync?: QboSync): FastifyI
|
||||
if (!sync) return reply.code(501).send({ error: "sync_not_configured" });
|
||||
if (sync.isRunning) return reply.code(409).send({ error: "already_running" });
|
||||
try {
|
||||
const r = await sync.run();
|
||||
const r = await sync.run({ full: (req.query as { full?: string } | undefined)?.full === "1" });
|
||||
return reply.code(r.status === "ok" ? 200 : 502).send(r);
|
||||
} catch (e) {
|
||||
if (e instanceof ReauthNeeded) return reply.code(409).send({ error: "reauth_needed", message: e.message });
|
||||
|
||||
Reference in New Issue
Block a user