Skip to content

Commit 07ff994

Browse files
authored
Refactor: Update createServerFn methods to POST
1 parent afd3f79 commit 07ff994

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/utils/banner.functions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export type BannerWithMeta = ActiveBanner & {
2828
}
2929

3030
// Server function to get active banners for a given path
31-
export const getActiveBanners = createServerFn({ method: 'GET' })
31+
export const getActiveBanners = createServerFn({ method: 'POST' })
3232
.inputValidator(
3333
v.object({
3434
pathname: v.string(),

src/utils/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export type ConfigSchema = v.InferOutput<typeof configSchema>
5151
/**
5252
Fetch the config file for the project and validate it.
5353
*/
54-
export const getTanstackDocsConfig = createServerFn({ method: 'GET' })
54+
export const getTanstackDocsConfig = createServerFn({ method: 'POST' })
5555
.inputValidator(
5656
v.object({ repo: v.string(), branch: v.string(), docsRoot: v.string() }),
5757
)

src/utils/docs.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const loadDocs = async ({
3737
})
3838
}
3939

40-
export const fetchDocs = createServerFn({ method: 'GET' })
40+
export const fetchDocs = createServerFn({ method: 'POST' })
4141
.inputValidator(
4242
v.object({ repo: v.string(), branch: v.string(), filePath: v.string() }),
4343
)
@@ -68,7 +68,7 @@ export const fetchDocs = createServerFn({ method: 'GET' })
6868
}
6969
})
7070

71-
export const fetchFile = createServerFn({ method: 'GET' })
71+
export const fetchFile = createServerFn({ method: 'POST' })
7272
.inputValidator(
7373
v.object({ repo: v.string(), branch: v.string(), filePath: v.string() }),
7474
)
@@ -91,7 +91,7 @@ export const fetchFile = createServerFn({ method: 'GET' })
9191
})
9292

9393
export const fetchRepoDirectoryContents = createServerFn({
94-
method: 'GET',
94+
method: 'POST',
9595
})
9696
.inputValidator(
9797
v.object({

0 commit comments

Comments
 (0)