Files
admin-frontend-domain/src/api/fm.ts
T
naibaandcloudcode 266cd7d150 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>
2026-05-26 04:07:52 +00:00

8 lines
272 B
TypeScript

import { ModelCreateFMResponse } from "@/types"
import { FetcherMethod, fetcher } from "./api"
export const createFM = async (id: string): Promise<ModelCreateFMResponse> => {
return fetcher<ModelCreateFMResponse>(FetcherMethod.POST, `/api/v1/file?id=${id}`, null)
}