From c8c3dabbe080973be78a460805ac3f91d318b76a Mon Sep 17 00:00:00 2001 From: Tatsuto YAMAMOTO Date: Sun, 21 Sep 2025 01:20:43 +0900 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20=E3=83=A1=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=82=A2=E3=83=89=E3=83=AC=E3=82=B9=E3=81=A7=E3=83=AD=E3=82=B0?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/lib/api/login.ts | 6 +++--- app/routes/login.tsx | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/lib/api/login.ts b/app/lib/api/login.ts index cf548b0..d5d3645 100644 --- a/app/lib/api/login.ts +++ b/app/lib/api/login.ts @@ -5,14 +5,14 @@ import type { import { createCookie } from "react-router"; export type LoginArgs = { - name: string; + email: string; passphrase: string; }; export type ERROR_MESSAGES = "INVALID_CREDENTIALS" | "CONNECTION_FAILED"; export const login = async ( - { name, passphrase }: LoginArgs, + { email, passphrase }: LoginArgs, basePath: string ): Promise< | { error: ERROR_MESSAGES } @@ -26,7 +26,7 @@ export const login = async ( headers: { "Content-Type": "application/json", }, - body: JSON.stringify({ name, passphrase, captcha_token: "" }), + body: JSON.stringify({ email, passphrase, captcha_token: "" }), }); if (!response.ok) { diff --git a/app/routes/login.tsx b/app/routes/login.tsx index 596046d..a093c82 100644 --- a/app/routes/login.tsx +++ b/app/routes/login.tsx @@ -26,11 +26,11 @@ export const meta: MetaFunction = () => { export const action = async ({ request, context }: ActionFunctionArgs) => { const formData = await request.formData(); - const name = formData.get("name") as string; + const email = formData.get("email") as string; const passphrase = formData.get("passphrase") as string; const basePath = (context.cloudflare.env as Env).API_BASE_URL; - const res = await login({ name, passphrase }, basePath); + const res = await login({ email, passphrase }, basePath); if ("error" in res) { const errorMessage = res.error === "INVALID_CREDENTIALS" @@ -63,14 +63,14 @@ export default function Login() {

- + Date: Wed, 1 Oct 2025 00:10:10 +0900 Subject: [PATCH 2/3] chore: fix e2e test account email --- tests/account.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/account.spec.ts b/tests/account.spec.ts index 24409ee..a2132bf 100644 --- a/tests/account.spec.ts +++ b/tests/account.spec.ts @@ -2,7 +2,7 @@ import { expect, test } from "@playwright/test"; test("has account info", async ({ page }) => { await page.goto("/login"); - await page.locator("#name").fill("@john@example.com"); + await page.locator("#email").fill("testuser101@example.com"); await page.locator("#password").fill("じゃすた・いぐざんぽぅ"); await page.locator("#password + [type='submit']").click(); await page.waitForURL("/"); From 7e97f612843eae901da0a6f611b307cde9df6de1 Mon Sep 17 00:00:00 2001 From: Tatsuto YAMAMOTO Date: Thu, 2 Oct 2025 22:57:28 +0900 Subject: [PATCH 3/3] chore: change autoComplete type --- app/routes/login.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes/login.tsx b/app/routes/login.tsx index a093c82..8cb6285 100644 --- a/app/routes/login.tsx +++ b/app/routes/login.tsx @@ -70,7 +70,7 @@ export default function Login() { name="email" required placeholder="name@example.com" - autoComplete="email" + autoComplete="username" />