fix: persist site api endpoints and account verification

This commit is contained in:
boos
2026-05-19 11:22:09 +08:00
parent b6aae5f301
commit 812a7c6c07
4 changed files with 564 additions and 34 deletions
+9 -1
View File
@@ -136,7 +136,15 @@ impl TokenRouter {
rc.route_id AS route_id,
rc.account_id AS account_id,
a.site_id AS site_id,
s.url AS base_url,
COALESCE((
SELECT sae.url
FROM site_api_endpoints sae
WHERE sae.site_id = s.id
AND COALESCE(sae.enabled, 1) = 1
AND (sae.cooldown_until IS NULL OR sae.cooldown_until <= datetime('now'))
ORDER BY COALESCE(sae.sort_order, 0), sae.id
LIMIT 1
), s.url) AS base_url,
s.api_key AS site_api_key,
a.access_token AS account_access_token,
a.api_token AS account_api_token,