mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 13:00:39 +00:00
refactor: update user decryption structure in sync response for consistency
This commit is contained in:
+11
-9
@@ -112,16 +112,18 @@ export async function handleSync(request: Request, env: Env, userId: string): Pr
|
|||||||
},
|
},
|
||||||
policies: [],
|
policies: [],
|
||||||
sends: [],
|
sends: [],
|
||||||
userDecryption: {
|
UserDecryptionOptions: {
|
||||||
masterPasswordUnlock: {
|
HasMasterPassword: true,
|
||||||
salt: user.email,
|
Object: 'userDecryptionOptions',
|
||||||
kdf: {
|
MasterPasswordUnlock: {
|
||||||
kdfType: user.kdfType,
|
Kdf: {
|
||||||
iterations: user.kdfIterations,
|
KdfType: user.kdfType,
|
||||||
memory: user.kdfMemory || null,
|
Iterations: user.kdfIterations,
|
||||||
parallelism: user.kdfParallelism || null,
|
Memory: user.kdfMemory || null,
|
||||||
|
Parallelism: user.kdfParallelism || null,
|
||||||
},
|
},
|
||||||
masterKeyEncryptedUserKey: user.key,
|
MasterKeyEncryptedUserKey: user.key,
|
||||||
|
Salt: user.email,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
object: 'sync',
|
object: 'sync',
|
||||||
|
|||||||
+1
-1
@@ -273,6 +273,6 @@ export interface SyncResponse {
|
|||||||
domains: any;
|
domains: any;
|
||||||
policies: any[];
|
policies: any[];
|
||||||
sends: any[];
|
sends: any[];
|
||||||
userDecryption: any | null;
|
UserDecryptionOptions: UserDecryptionOptions | null;
|
||||||
object: string;
|
object: string;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user