fix(api): update login endpoint
remove the `select` call so password validation doesn't fail
This commit is contained in:
parent
f049619178
commit
b2c99726bc
@ -7,7 +7,7 @@ import { doNotSelect } from "@server/constants";
|
||||
export default eventHandler(async (event) => {
|
||||
const wrongMsg = "wrong credentials";
|
||||
let reqbody = await readBody(event);
|
||||
let user = await User.findOne({ username: reqbody.username }).select(doNotSelect).exec();
|
||||
let user = await User.findOne({ username: reqbody.username }).exec();
|
||||
// log.debug(reqbody, { label: "login/body" });
|
||||
// log.debug("USER -> " + user, { label: "login" });
|
||||
// log.debug("conn ->" + mongoose.connection, { label: "login" });
|
||||
|
Loading…
x
Reference in New Issue
Block a user