0
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2024-11-21 18:58:58 +01:00
uptime-kuma/server/2fa.js

19 lines
379 B
JavaScript
Raw Permalink Normal View History

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