mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-05 06:42:12 +03:00
fix(oauth): persist providerSpecificData from token refresh in health check
The health check refresh path was silently dropping result.providerSpecificData, so resourceUrl (returned by Qwen on token refresh) was never persisted to the DB. Now deep-merges refresh result providerSpecificData into the existing connection data. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -282,6 +282,13 @@ async function checkConnection(conn) {
|
||||
updateData.tokenExpiresAt = new Date(Date.now() + result.expiresIn * 1000).toISOString();
|
||||
}
|
||||
|
||||
if (result.providerSpecificData) {
|
||||
updateData.providerSpecificData = {
|
||||
...(conn.providerSpecificData || {}),
|
||||
...result.providerSpecificData,
|
||||
};
|
||||
}
|
||||
|
||||
await updateProviderConnection(conn.id, updateData);
|
||||
log(`${LOG_PREFIX} ✓ ${conn.provider}/${conn.name || conn.email || conn.id} refreshed`);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user