diff --git a/docs/start/framework/react/guide/rendering-markdown.md b/docs/start/framework/react/guide/rendering-markdown.md index d8654786e2..703c0f311d 100644 --- a/docs/start/framework/react/guide/rendering-markdown.md +++ b/docs/start/framework/react/guide/rendering-markdown.md @@ -334,7 +334,7 @@ type FetchDocsParams = { } export const fetchDocs = createServerFn({ method: 'GET' }) - .validator((params: FetchDocsParams) => params) + .inputValidator((params: FetchDocsParams) => params) .handler(async ({ data: { repo, branch, filePath } }) => { const url = `https://raw.githubusercontent.com/${repo}/${branch}/${filePath}` @@ -366,7 +366,7 @@ For production, add appropriate cache headers: ```tsx export const fetchDocs = createServerFn({ method: 'GET' }) - .validator((params: FetchDocsParams) => params) + .inputValidator((params: FetchDocsParams) => params) .handler(async ({ data: { repo, branch, filePath }, context }) => { // Set cache headers for CDN caching context.response.headers.set( @@ -428,7 +428,9 @@ type GitHubContent = { } export const fetchRepoContents = createServerFn({ method: 'GET' }) - .validator((params: { repo: string; branch: string; path: string }) => params) + .inputValidator( + (params: { repo: string; branch: string; path: string }) => params, + ) .handler(async ({ data: { repo, branch, path } }) => { const url = `https://api.github.com/repos/${repo}/contents/${path}?ref=${branch}`