From 07ff9948c72c953d3cf6b2f9369483bd85cf1294 Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Sun, 22 Feb 2026 04:34:38 +0000 Subject: [PATCH] Refactor: Update createServerFn methods to POST --- src/utils/banner.functions.ts | 2 +- src/utils/config.ts | 2 +- src/utils/docs.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/banner.functions.ts b/src/utils/banner.functions.ts index 608787320..005578d93 100644 --- a/src/utils/banner.functions.ts +++ b/src/utils/banner.functions.ts @@ -28,7 +28,7 @@ export type BannerWithMeta = ActiveBanner & { } // Server function to get active banners for a given path -export const getActiveBanners = createServerFn({ method: 'GET' }) +export const getActiveBanners = createServerFn({ method: 'POST' }) .inputValidator( v.object({ pathname: v.string(), diff --git a/src/utils/config.ts b/src/utils/config.ts index 52877b602..c2b29037a 100644 --- a/src/utils/config.ts +++ b/src/utils/config.ts @@ -51,7 +51,7 @@ export type ConfigSchema = v.InferOutput /** Fetch the config file for the project and validate it. */ -export const getTanstackDocsConfig = createServerFn({ method: 'GET' }) +export const getTanstackDocsConfig = createServerFn({ method: 'POST' }) .inputValidator( v.object({ repo: v.string(), branch: v.string(), docsRoot: v.string() }), ) diff --git a/src/utils/docs.ts b/src/utils/docs.ts index 7a7b177a4..e9252a94d 100644 --- a/src/utils/docs.ts +++ b/src/utils/docs.ts @@ -37,7 +37,7 @@ export const loadDocs = async ({ }) } -export const fetchDocs = createServerFn({ method: 'GET' }) +export const fetchDocs = createServerFn({ method: 'POST' }) .inputValidator( v.object({ repo: v.string(), branch: v.string(), filePath: v.string() }), ) @@ -68,7 +68,7 @@ export const fetchDocs = createServerFn({ method: 'GET' }) } }) -export const fetchFile = createServerFn({ method: 'GET' }) +export const fetchFile = createServerFn({ method: 'POST' }) .inputValidator( v.object({ repo: v.string(), branch: v.string(), filePath: v.string() }), ) @@ -91,7 +91,7 @@ export const fetchFile = createServerFn({ method: 'GET' }) }) export const fetchRepoDirectoryContents = createServerFn({ - method: 'GET', + method: 'POST', }) .inputValidator( v.object({