mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-09-19 09:40:13 +00:00
fix(cron): switch manual trigger to POST to match backend CSRF fix
Backend GHSA-8qhj-4f8c-j8qg moves /api/v1/cron/:id/manual from GET to POST so SameSite=Lax cookies no longer expose this state-changing endpoint to cross-site CSRF. Update runCron() accordingly. Co-authored-by: cloudcode <cloudcode@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -15,5 +15,5 @@ export const deleteCron = async (id: number[]): Promise<void> => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const runCron = async (id: number): Promise<void> => {
|
export const runCron = async (id: number): Promise<void> => {
|
||||||
return fetcher<void>(FetcherMethod.GET, `/api/v1/cron/${id}/manual`, null)
|
return fetcher<void>(FetcherMethod.POST, `/api/v1/cron/${id}/manual`, null)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user