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