Fix cache state

This commit is contained in:
KernelDeimos 2024-05-03 18:44:48 -04:00
parent d72d83d0f3
commit a2a8f9de74

View File

@ -73,6 +73,8 @@ module.exports = eggspress('/auth/configure-2fa/:action', {
`UPDATE user SET otp_enabled = 0, otp_recovery_codes = '' WHERE uuid = ?`,
[user.uuid]
);
// update cached user
req.user.otp_enabled = 0;
return { success: true };
};