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() {