uptime-kuma/server/2fa.js
Matthew Nickson 03b2d8d521
Add JSDoc to server/*
Signed-off-by: Matthew Nickson <[email protected]>
2022-04-20 19:56:40 +01:00

19 lines
379 B
JavaScript

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;