diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-03-21 01:54:54 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-03-21 01:54:54 +0900 |
| commit | 4acf8d51b257c30b1a5dd99bd515ac22ddd5b564 (patch) | |
| tree | 495071797a64ab8364061583e7ad61c23bcbfe77 /frontend/app/.server/auth.ts | |
| parent | 338313f3fb97aa96b7cf75596ddcbf55f6a9002d (diff) | |
| download | phperkaigi-2025-albatross-4acf8d51b257c30b1a5dd99bd515ac22ddd5b564.tar.gz phperkaigi-2025-albatross-4acf8d51b257c30b1a5dd99bd515ac22ddd5b564.tar.zst phperkaigi-2025-albatross-4acf8d51b257c30b1a5dd99bd515ac22ddd5b564.zip | |
refactor(frontend): api client
Diffstat (limited to 'frontend/app/.server/auth.ts')
| -rw-r--r-- | frontend/app/.server/auth.ts | 4 |
1 files changed, 2 insertions, 2 deletions
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", ); |
