mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-03-13 12:56:22 +00:00
fix: Removes unused credential clearing function
Removes the `_clearAllCredentials` function as it is no longer used. This simplifies the codebase and removes potentially confusing logic.
This commit is contained in:
@@ -200,24 +200,6 @@ export async function hasAccountCredential(
|
||||
return stored !== null;
|
||||
}
|
||||
|
||||
async function _clearAllCredentials(): Promise<void> {
|
||||
const previousServers = getPreviousServers();
|
||||
|
||||
for (const server of previousServers) {
|
||||
for (const account of server.accounts) {
|
||||
const key = credentialKey(server.address, account.userId);
|
||||
await SecureStore.deleteItemAsync(key);
|
||||
}
|
||||
}
|
||||
|
||||
// Clear all accounts from servers
|
||||
const clearedServers = previousServers.map((server) => ({
|
||||
...server,
|
||||
accounts: [],
|
||||
}));
|
||||
storage.set("previousServers", JSON.stringify(clearedServers));
|
||||
}
|
||||
|
||||
/**
|
||||
* Add or update an account in a server's accounts list.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user