Skip to content

Commit

Permalink
fix: nuxt module not passing options correctly (#1018)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge authored Oct 16, 2024
1 parent b180bf1 commit 06c6787
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/sharp-needles-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@uploadthing/nuxt": patch
---

fix: options was not forwarded to uploadthing handler correctly
7 changes: 1 addition & 6 deletions packages/nuxt/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import type { RouteHandlerConfig } from "uploadthing/internal/types";
// Module options TypeScript interface definition
export type ModuleOptions = RouteHandlerConfig & {
routerPath: string;
secret?: string;
appId?: string;
};

export default defineNuxtModule<ModuleOptions>({
Expand All @@ -37,10 +35,7 @@ export default defineNuxtModule<ModuleOptions>({

nuxt.options.runtimeConfig.uploadthing = defu(
nuxt.options.runtimeConfig.uploadthing as any,
{
token: options.token,
logLevel: options.logLevel,
},
options,
);

// Set path to router
Expand Down

0 comments on commit 06c6787

Please sign in to comment.