mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-08 17:40:43 +08:00
Some improvements
This commit is contained in:
@@ -12,6 +12,10 @@ const { loginRateLimiter } = require("./rate-limiter");
|
||||
* @returns {Promise<Bean|null>}
|
||||
*/
|
||||
exports.login = async function (username, password) {
|
||||
if (typeof username !== "string" || typeof password !== "string") {
|
||||
return null;
|
||||
}
|
||||
|
||||
let user = await R.findOne("user", " username = ? AND active = 1 ", [
|
||||
username,
|
||||
]);
|
||||
|
Reference in New Issue
Block a user