mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 21:00:41 +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: [],
|
||||
sends: [],
|
||||
userDecryption: {
|
||||
masterPasswordUnlock: {
|
||||
salt: user.email,
|
||||
kdf: {
|
||||
kdfType: user.kdfType,
|
||||
iterations: user.kdfIterations,
|
||||
memory: user.kdfMemory || null,
|
||||
parallelism: user.kdfParallelism || null,
|
||||
UserDecryptionOptions: {
|
||||
HasMasterPassword: true,
|
||||
Object: 'userDecryptionOptions',
|
||||
MasterPasswordUnlock: {
|
||||
Kdf: {
|
||||
KdfType: user.kdfType,
|
||||
Iterations: user.kdfIterations,
|
||||
Memory: user.kdfMemory || null,
|
||||
Parallelism: user.kdfParallelism || null,
|
||||
},
|
||||
masterKeyEncryptedUserKey: user.key,
|
||||
MasterKeyEncryptedUserKey: user.key,
|
||||
Salt: user.email,
|
||||
},
|
||||
},
|
||||
object: 'sync',
|
||||
|
||||
+1
-1
@@ -273,6 +273,6 @@ export interface SyncResponse {
|
||||
domains: any;
|
||||
policies: any[];
|
||||
sends: any[];
|
||||
userDecryption: any | null;
|
||||
UserDecryptionOptions: UserDecryptionOptions | null;
|
||||
object: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user