feat: refactor cipher login data type for improved clarity

This commit is contained in:
shuaiplus
2026-05-18 02:13:01 +08:00
parent c50247b8fe
commit 04ebfc7021
+4 -2
View File
@@ -19,6 +19,8 @@ import {
import { readResponseBytesWithProgress } from '../download';
import { loadVaultCoreSyncSnapshot } from './vault-sync';
type CipherLoginData = NonNullable<Cipher['login']>;
export async function getFolders(authedFetch: AuthedFetch, cacheKey: string): Promise<Folder[]> {
const body = await loadVaultCoreSyncSnapshot(authedFetch, cacheKey);
return body.folders || [];
@@ -737,8 +739,8 @@ async function repairCipherLoginUris(
return {
login: {
...encryptedLogin,
uris: uris as Cipher['login']['uris'],
} as Cipher['login'],
uris: uris as CipherLoginData['uris'],
} as CipherLoginData,
changed,
};
}