Skip to content

Commit

Permalink
docs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
unnoq committed Dec 26, 2024
1 parent 841f296 commit c77997e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/content/content/docs/server/context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ import { os, ORPCError, createProcedureClient } from '@orpc/server'
import { ORPCHandler } from '@orpc/server/fetch'
import { OpenAPIServerlessHandler, OpenAPIServerHandler } from '@orpc/openapi/fetch'

const orpcHandler = new ORPCHandler(router)

type ORPCContext = { user?: { id: string }, db: 'fake-db' }

const base = os.context<ORPCContext>()
Expand All @@ -130,6 +128,8 @@ export const router = base.router({
}),
})

const orpcHandler = new ORPCHandler(router)

export function fetch(request: Request) {
// Initialize context explicitly for each request
const db = 'fake-db' as const
Expand Down

0 comments on commit c77997e

Please sign in to comment.