mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-09-19 17:50:13 +00:00
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:
+1
-1
@@ -3,5 +3,5 @@ import { ModelCreateFMResponse } from "@/types"
|
||||
import { FetcherMethod, fetcher } from "./api"
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user