Skip to content

Commit

Permalink
fix: operation on s3 protocol (#592)
Browse files Browse the repository at this point in the history
  • Loading branch information
fenos authored Nov 28, 2024
1 parent 29a13ff commit 5dbd9cd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/http/plugins/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const db = fastifyPlugin(
headers: request.headers,
path: request.url,
method: request.method,
operation: request.operation?.type,
operation: () => request.operation?.type,
})
})

Expand Down Expand Up @@ -111,6 +111,7 @@ export const dbSuperUser = fastifyPlugin<DbSuperUserPluginOptions>(
method: request.method,
headers: request.headers,
disableHostCheck: opts.disableHostCheck,
operation: () => request.operation?.type,
})
})

Expand Down
2 changes: 1 addition & 1 deletion src/internal/database/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface ConnectionOptions {
user: User
superUser: User
disableHostCheck?: boolean
operation?: string
operation?: () => string | undefined
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/internal/database/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface TenantConnectionOptions {
headers?: Record<string, string | undefined | string[]>
method?: string
path?: string
operation?: string
operation?: () => string | undefined
}

export interface User {
Expand Down Expand Up @@ -252,7 +252,7 @@ export class TenantConnection {
headers,
this.options.method || '',
this.options.path || '',
this.options.operation || '',
this.options.operation?.() || '',
]
)
}
Expand Down

0 comments on commit 5dbd9cd

Please sign in to comment.