diff options
Diffstat (limited to 'server/2fa.js')
-rw-r--r-- | server/2fa.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/server/2fa.js b/server/2fa.js new file mode 100644 index 0000000..c7076da --- /dev/null +++ b/server/2fa.js @@ -0,0 +1,18 @@ +const { R } = require("redbean-node"); + +class TwoFA { + + /** + * Disable 2FA for specified user + * @param {number} userID ID of user to disable + * @returns {Promise<void>} + */ + static async disable2FA(userID) { + return await R.exec("UPDATE `user` SET twofa_status = 0 WHERE id = ? ", [ + userID, + ]); + } + +} + +module.exports = TwoFA; |