mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-09-19 09:40:13 +00:00
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>
8 lines
272 B
TypeScript
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)
|
|
}
|