bug fixed
This commit is contained in:
parent
0c6911aaf0
commit
9f181fb15e
|
@ -30,6 +30,11 @@ export default async function postUser(
|
||||||
? !body.password || !body.name || !body.email
|
? !body.password || !body.name || !body.email
|
||||||
: !body.username || !body.password || !body.name;
|
: !body.username || !body.password || !body.name;
|
||||||
|
|
||||||
|
if (body.password.length < 8)
|
||||||
|
return res
|
||||||
|
.status(400)
|
||||||
|
.json({ response: "Password must be at least 8 characters." });
|
||||||
|
|
||||||
if (checkHasEmptyFields)
|
if (checkHasEmptyFields)
|
||||||
return res
|
return res
|
||||||
.status(400)
|
.status(400)
|
||||||
|
|
|
@ -23,6 +23,11 @@ export default async function updateUserById(
|
||||||
response: "Username invalid.",
|
response: "Username invalid.",
|
||||||
status: 400,
|
status: 400,
|
||||||
};
|
};
|
||||||
|
if (data.newPassword && data.newPassword?.length < 8)
|
||||||
|
return {
|
||||||
|
response: "Password must be at least 8 characters.",
|
||||||
|
status: 400,
|
||||||
|
};
|
||||||
|
|
||||||
// Check email (if enabled)
|
// Check email (if enabled)
|
||||||
const checkEmail =
|
const checkEmail =
|
||||||
|
|
|
@ -234,6 +234,8 @@ body {
|
||||||
}
|
}
|
||||||
.reader-view img {
|
.reader-view img {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
margin-top: 2rem;
|
||||||
|
margin-bottom: 2rem;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
.reader-view pre {
|
.reader-view pre {
|
||||||
|
|
Ŝarĝante…
Reference in New Issue