Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion express/username-and-password/routes/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ loginRouter.post("/login", async (req, res) => {
if (!username || username.length < 3 || username.length > 31 || !/^[a-z0-9_-]+$/.test(username)) {
const html = await renderPage({
username_value: username ?? "",
error: "Invalid password"
error: "Invalid username"
});
return res.setHeader("Content-Type", "text/html").status(400).send(html);
}
Expand Down
2 changes: 1 addition & 1 deletion express/username-and-password/routes/signup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ signupRouter.post("/signup", async (req, res) => {
if (!username || username.length < 3 || username.length > 31 || !/^[a-z0-9_-]+$/.test(username)) {
const html = await renderPage({
username_value: username ?? "",
error: "Invalid password"
error: "Invalid username"
});
return res.setHeader("Content-Type", "text/html").status(400).send(html);
}
Expand Down
2 changes: 1 addition & 1 deletion hono/username-and-password/routes/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ loginRouter.post("/login", async (c) => {
if (!username || username.length < 3 || username.length > 31 || !/^[a-z0-9_-]+$/.test(username)) {
const html = await renderPage({
username_value: username ?? "",
error: "Invalid password"
error: "Invalid username"
});
return c.html(html, 200);
}
Expand Down
2 changes: 1 addition & 1 deletion hono/username-and-password/routes/signup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ signupRouter.post("/signup", async (c) => {
if (!username || username.length < 3 || username.length > 31 || !/^[a-z0-9_-]+$/.test(username)) {
const html = await renderPage({
username_value: username ?? "",
error: "Invalid password"
error: "Invalid username"
});
return c.html(html, 200);
}
Expand Down