fix: fix createUser without password

This commit is contained in:
wancat committed 2023-11-18 18:22:27 +08:00
1 parent d3945eeaa7
commit f81c96be62
3 files changed
+5 -4

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@ export const issueToken = asyncHandler(async (req, res) => {
export const register = asyncHandler(async (req, res, next) => {
const { username, password, email } = matchedData(req)
const user = await createUser(username, email, password)
const user = await createUser(username, email, { password })
req.login(user, (err) => {
if (err) {
next(err)