mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 13:00:39 +00:00
feat: refactor cipher login data type for improved clarity
This commit is contained in:
@@ -19,6 +19,8 @@ import {
|
|||||||
import { readResponseBytesWithProgress } from '../download';
|
import { readResponseBytesWithProgress } from '../download';
|
||||||
import { loadVaultCoreSyncSnapshot } from './vault-sync';
|
import { loadVaultCoreSyncSnapshot } from './vault-sync';
|
||||||
|
|
||||||
|
type CipherLoginData = NonNullable<Cipher['login']>;
|
||||||
|
|
||||||
export async function getFolders(authedFetch: AuthedFetch, cacheKey: string): Promise<Folder[]> {
|
export async function getFolders(authedFetch: AuthedFetch, cacheKey: string): Promise<Folder[]> {
|
||||||
const body = await loadVaultCoreSyncSnapshot(authedFetch, cacheKey);
|
const body = await loadVaultCoreSyncSnapshot(authedFetch, cacheKey);
|
||||||
return body.folders || [];
|
return body.folders || [];
|
||||||
@@ -737,8 +739,8 @@ async function repairCipherLoginUris(
|
|||||||
return {
|
return {
|
||||||
login: {
|
login: {
|
||||||
...encryptedLogin,
|
...encryptedLogin,
|
||||||
uris: uris as Cipher['login']['uris'],
|
uris: uris as CipherLoginData['uris'],
|
||||||
} as Cipher['login'],
|
} as CipherLoginData,
|
||||||
changed,
|
changed,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user