fix(fm): switch createFM to POST to match backend CSRF fix

Backend moves /api/v1/file from GET to POST so SameSite=Lax cookies
can no longer expose this state-changing endpoint to cross-site
CSRF. Update createFM() accordingly.

Co-authored-by: cloudcode <cloudcode@users.noreply.github.com>
This commit is contained in:
naiba
2026-05-26 04:07:52 +00:00
co-authored by cloudcode
parent f2fea38e10
commit c80899a753
+1 -1
View File
@@ -3,5 +3,5 @@ import { ModelCreateFMResponse } from "@/types"
import { FetcherMethod, fetcher } from "./api" import { FetcherMethod, fetcher } from "./api"
export const createFM = async (id: string): Promise<ModelCreateFMResponse> => { export const createFM = async (id: string): Promise<ModelCreateFMResponse> => {
return fetcher<ModelCreateFMResponse>(FetcherMethod.GET, `/api/v1/file?id=${id}`, null) return fetcher<ModelCreateFMResponse>(FetcherMethod.POST, `/api/v1/file?id=${id}`, null)
} }