From 4acf8d51b257c30b1a5dd99bd515ac22ddd5b564 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 21 Mar 2025 01:54:54 +0900 Subject: refactor(frontend): api client --- frontend/app/.server/auth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'frontend/app/.server') diff --git a/frontend/app/.server/auth.ts b/frontend/app/.server/auth.ts index cbeb141..81ceadf 100644 --- a/frontend/app/.server/auth.ts +++ b/frontend/app/.server/auth.ts @@ -2,7 +2,7 @@ import { jwtDecode } from "jwt-decode"; import { redirect } from "react-router"; import { Authenticator } from "remix-auth"; import { FormStrategy } from "remix-auth-form"; -import { apiPostLogin } from "../api/client"; +import { apiLogin } from "../api/client"; import { components } from "../api/schema"; import { createUnstructuredCookie } from "./cookie"; import { cookieOptions, sessionStorage } from "./session"; @@ -13,7 +13,7 @@ authenticator.use( new FormStrategy(async ({ form }) => { const username = String(form.get("username")); const password = String(form.get("password")); - return (await apiPostLogin(username, password)).token; + return (await apiLogin(username, password)).token; }), "default", ); -- cgit v1.2.3-70-g09d2