Skip to content

Commit

Permalink
Merge pull request #16 from aklinker1/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
michealroberts authored Mar 12, 2024
2 parents ece64ec + 4dddb24 commit 31ea38c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/defineNitroTRPCEventHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const defineNitroTRPCEventHandler: NitroRequestHandler = <TRouter extends
// Create a URL object from the request URL:
const url = createURL(request.url!)

// Obtain the URL query paramaters:
// Obtain the URL query parameters:
const query = url.searchParams

// Obtain the URL path:
Expand Down Expand Up @@ -139,7 +139,7 @@ export const defineNitroTRPCEventHandler: NitroRequestHandler = <TRouter extends
}
})

// Set the statis code accordingly:
// Set the status code accordingly:
setResponseStatus(event, status)

// Merge response headers accordingly:
Expand Down
8 changes: 4 additions & 4 deletions src/internals/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export const getPath = (event: H3Event): string => {
const params = event.context.params

if (!params) {
// Throw an error if the trpc paramater is not a string or an array:
// Throw an error if the trpc parameter is not a string or an array:
throw new TRPCError({
code: 'INTERNAL_SERVER_ERROR',
message:
'Please ensure that the trpc paramater is defined in your routes file e.g., ./routes/[trpc].ts',
'Please ensure that the trpc parameter is defined in your routes file e.g., ./routes/[trpc].ts',
cause: 'Nitro Routing Configuration'
})
}
Expand All @@ -33,11 +33,11 @@ export const getPath = (event: H3Event): string => {
return params.trpc
}

// Throw an error if the trpc paramater is not a string or an array:
// Throw an error if the trpc parameter is not a string or an array:
throw new TRPCError({
code: 'INTERNAL_SERVER_ERROR',
message:
'Please ensure that the trpc paramater is defined in your routes file e.g., ./routes/[trpc].ts',
'Please ensure that the trpc parameter is defined in your routes file e.g., ./routes/[trpc].ts',
cause: 'Nitro Routing Configuration'
})
}
Expand Down

0 comments on commit 31ea38c

Please sign in to comment.