2021-11-18 05:22:03 -05:00
|
|
|
const { R } = require("redbean-node");
|
|
|
|
|
|
|
|
class TwoFA {
|
|
|
|
|
2022-04-20 14:56:40 -04:00
|
|
|
/**
|
|
|
|
* Disable 2FA for specified user
|
|
|
|
* @param {number} userID ID of user to disable
|
|
|
|
* @returns {Promise<void>}
|
|
|
|
*/
|
2021-11-18 05:22:03 -05:00
|
|
|
static async disable2FA(userID) {
|
|
|
|
return await R.exec("UPDATE `user` SET twofa_status = 0 WHERE id = ? ", [
|
|
|
|
userID,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = TwoFA;
|