@@ -51,7 +51,6 @@ const route: FastifyPluginAsyncTypebox = async (fastify) => {
5151 offset,
5252 includeColumns,
5353 } )
54- await pgMeta . end ( )
5554 if ( error ) {
5655 request . log . error ( { error, request : extractRequestForLogging ( request ) } )
5756 reply . code ( translateErrorToResponseCode ( error , 500 ) )
@@ -86,7 +85,6 @@ const route: FastifyPluginAsyncTypebox = async (fastify) => {
8685
8786 const pgMeta = PgMetaCache . get ( connectionString )
8887 const { data, error } = await pgMeta . tables . retrieve ( { id } )
89- await pgMeta . end ( )
9088 if ( error ) {
9189 request . log . error ( { error, request : extractRequestForLogging ( request ) } )
9290 reply . code ( 404 )
@@ -118,7 +116,6 @@ const route: FastifyPluginAsyncTypebox = async (fastify) => {
118116
119117 const pgMeta = PgMetaCache . get ( connectionString )
120118 const { data, error } = await pgMeta . tables . create ( request . body )
121- await pgMeta . end ( )
122119 if ( error ) {
123120 request . log . error ( { error, request : extractRequestForLogging ( request ) } )
124121 reply . code ( 400 )
@@ -157,7 +154,6 @@ const route: FastifyPluginAsyncTypebox = async (fastify) => {
157154
158155 const pgMeta = PgMetaCache . get ( connectionString )
159156 const { data, error } = await pgMeta . tables . update ( id , request . body )
160- await pgMeta . end ( )
161157 if ( error ) {
162158 request . log . error ( { error, request : extractRequestForLogging ( request ) } )
163159 reply . code ( 400 )
@@ -200,7 +196,6 @@ const route: FastifyPluginAsyncTypebox = async (fastify) => {
200196
201197 const pgMeta = PgMetaCache . get ( connectionString )
202198 const { data, error } = await pgMeta . tables . remove ( id , { cascade } )
203- await pgMeta . end ( )
204199 if ( error ) {
205200 request . log . error ( { error, request : extractRequestForLogging ( request ) } )
206201 reply . code ( 400 )
0 commit comments