Skip to content

Commit

Permalink
🔧 fix: clone hook
Browse files Browse the repository at this point in the history
  • Loading branch information
SaltyAom committed Oct 8, 2024
1 parent 8c4634a commit 55b86f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elysiajs/swagger",
"version": "1.1.4",
"version": "1.1.5",
"description": "Plugin for Elysia to auto-generate Swagger page",
"author": {
"name": "saltyAom",
Expand Down
2 changes: 2 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ export const registerSchemaPath = ({
hook?: LocalHook<any, any, any, any, any, any, any>
models: Record<string, TSchema>
}) => {
hook = cloneHook(hook)

const contentType = hook?.type ?? [
'application/json',
'multipart/form-data',
Expand Down

0 comments on commit 55b86f0

Please sign in to comment.