File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export const db = fastifyPlugin(
49
49
headers : request . headers ,
50
50
path : request . url ,
51
51
method : request . method ,
52
- operation : request . operation ?. type ,
52
+ operation : ( ) => request . operation ?. type ,
53
53
} )
54
54
} )
55
55
@@ -111,6 +111,7 @@ export const dbSuperUser = fastifyPlugin<DbSuperUserPluginOptions>(
111
111
method : request . method ,
112
112
headers : request . headers ,
113
113
disableHostCheck : opts . disableHostCheck ,
114
+ operation : ( ) => request . operation ?. type ,
114
115
} )
115
116
} )
116
117
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ interface ConnectionOptions {
12
12
user : User
13
13
superUser : User
14
14
disableHostCheck ?: boolean
15
- operation ?: string
15
+ operation ?: ( ) => string | undefined
16
16
}
17
17
18
18
/**
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ interface TenantConnectionOptions {
34
34
headers ?: Record < string , string | undefined | string [ ] >
35
35
method ?: string
36
36
path ?: string
37
- operation ?: string
37
+ operation ?: ( ) => string | undefined
38
38
}
39
39
40
40
export interface User {
@@ -252,7 +252,7 @@ export class TenantConnection {
252
252
headers ,
253
253
this . options . method || '' ,
254
254
this . options . path || '' ,
255
- this . options . operation || '' ,
255
+ this . options . operation ?. ( ) || '' ,
256
256
]
257
257
)
258
258
}
You can’t perform that action at this time.
0 commit comments