mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-05 08:17:19 +00:00
fix(cliproxy): prevent blank page in remote mode
This commit is contained in:
@@ -184,13 +184,7 @@ router.get('/accounts', async (_req: Request, res: Response): Promise<void> => {
|
||||
const target = getProxyTarget();
|
||||
if (target.isRemote) {
|
||||
const authStatus = await fetchRemoteAuthStatus(target);
|
||||
// Transform RemoteAuthStatus[] to account summary format
|
||||
const accounts = authStatus.flatMap((status) =>
|
||||
status.accounts.map((acc) => ({
|
||||
provider: status.provider,
|
||||
...acc,
|
||||
}))
|
||||
);
|
||||
const accounts = authStatus.flatMap((status) => status.accounts);
|
||||
res.json({ accounts, source: 'remote' });
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user