MCPcopy Create free account
hub / github.com/anus-dev/ANUS / clearCachedGoogleAccount

Function clearCachedGoogleAccount

packages/core/src/utils/user_account.ts:100–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98}
99
100export async function clearCachedGoogleAccount(): Promise<void> {
101 const filePath = getGoogleAccountsCachePath();
102 if (!existsSync(filePath)) {
103 return;
104 }
105
106 const accounts = await readAccounts(filePath);
107
108 if (accounts.active) {
109 if (!accounts.old.includes(accounts.active)) {
110 accounts.old.push(accounts.active);
111 }
112 accounts.active = null;
113 }
114
115 await fsp.writeFile(filePath, JSON.stringify(accounts, null, 2), 'utf-8');
116}

Callers 2

Calls 2

readAccountsFunction · 0.85

Tested by

no test coverage detected