Skip to content

Commit

Permalink
Add required backup key return fields for GET backup key
Browse files Browse the repository at this point in the history
  • Loading branch information
dangtony98 committed Dec 12, 2022
1 parent 95a1e95 commit 6f90064
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/controllers/passwordController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ export const getBackupPrivateKey = async (req: Request, res: Response) => {
try {
backupPrivateKey = await BackupPrivateKey.findOne({
user: req.user._id
});
}).select('+encryptedPrivateKey +iv +tag');

if (!backupPrivateKey) throw new Error('Failed to find backup private key');
} catch (err) {
Expand Down

0 comments on commit 6f90064

Please sign in to comment.