fix: persist site api endpoints and account verification
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user