From 04ebfc70218975bc2dffb19ec116e323b1dfc748 Mon Sep 17 00:00:00 2001 From: shuaiplus <2327005759@qq.com> Date: Mon, 18 May 2026 02:13:01 +0800 Subject: [PATCH] feat: refactor cipher login data type for improved clarity --- webapp/src/lib/api/vault.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webapp/src/lib/api/vault.ts b/webapp/src/lib/api/vault.ts index 471cf9e..aaaf4b7 100644 --- a/webapp/src/lib/api/vault.ts +++ b/webapp/src/lib/api/vault.ts @@ -19,6 +19,8 @@ import { import { readResponseBytesWithProgress } from '../download'; import { loadVaultCoreSyncSnapshot } from './vault-sync'; +type CipherLoginData = NonNullable; + export async function getFolders(authedFetch: AuthedFetch, cacheKey: string): Promise { 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, }; }