@@ -51,7 +51,6 @@ const route: FastifyPluginAsyncTypebox = async (fastify) => {
51
51
offset,
52
52
includeColumns,
53
53
} )
54
- await pgMeta . end ( )
55
54
if ( error ) {
56
55
request . log . error ( { error, request : extractRequestForLogging ( request ) } )
57
56
reply . code ( translateErrorToResponseCode ( error , 500 ) )
@@ -86,7 +85,6 @@ const route: FastifyPluginAsyncTypebox = async (fastify) => {
86
85
87
86
const pgMeta = PgMetaCache . get ( connectionString )
88
87
const { data, error } = await pgMeta . tables . retrieve ( { id } )
89
- await pgMeta . end ( )
90
88
if ( error ) {
91
89
request . log . error ( { error, request : extractRequestForLogging ( request ) } )
92
90
reply . code ( 404 )
@@ -118,7 +116,6 @@ const route: FastifyPluginAsyncTypebox = async (fastify) => {
118
116
119
117
const pgMeta = PgMetaCache . get ( connectionString )
120
118
const { data, error } = await pgMeta . tables . create ( request . body )
121
- await pgMeta . end ( )
122
119
if ( error ) {
123
120
request . log . error ( { error, request : extractRequestForLogging ( request ) } )
124
121
reply . code ( 400 )
@@ -157,7 +154,6 @@ const route: FastifyPluginAsyncTypebox = async (fastify) => {
157
154
158
155
const pgMeta = PgMetaCache . get ( connectionString )
159
156
const { data, error } = await pgMeta . tables . update ( id , request . body )
160
- await pgMeta . end ( )
161
157
if ( error ) {
162
158
request . log . error ( { error, request : extractRequestForLogging ( request ) } )
163
159
reply . code ( 400 )
@@ -200,7 +196,6 @@ const route: FastifyPluginAsyncTypebox = async (fastify) => {
200
196
201
197
const pgMeta = PgMetaCache . get ( connectionString )
202
198
const { data, error } = await pgMeta . tables . remove ( id , { cascade } )
203
- await pgMeta . end ( )
204
199
if ( error ) {
205
200
request . log . error ( { error, request : extractRequestForLogging ( request ) } )
206
201
reply . code ( 400 )
0 commit comments