remove server.log setting item

This commit is contained in:
undefined committed 2020-07-25 19:23:48 +08:00
1 parent e62e7b49a3
commit ee78271a84
27 files changed
+159 -114

No files matched your search

+3 -3
View File
@@ -15,8 +15,8 @@ import { sendMail } from '../lib/mail';
import * as misc from '../lib/misc';
import {
UserAlreadyExistError, InvalidTokenError, VerifyPasswordError,
UserNotFoundError, LoginError, SystemError,
BlacklistedError, UserFacingError,
UserNotFoundError, SystemError, BlacklistedError,
UserFacingError,
} from '../error';
class UserLoginHandler extends Handler {
@@ -35,7 +35,7 @@ class UserLoginHandler extends Handler {
@param('rememberme', Types.Boolean, true)
async post(domainId: string, uname: string, password: string, rememberme = false) {
const udoc = await user.getByUname(domainId, uname);
if (!udoc) throw new LoginError(uname);
if (!udoc) throw new UserNotFoundError(uname);
udoc.checkPassword(password);
await user.setById(udoc._id, { loginat: new Date(), loginip: this.request.ip });
if (udoc.priv === PRIV.PRIV_NONE) throw new BlacklistedError(uname);