@@ -125,7 +125,7 @@ const abac = (db: Kysely<Database>, debugLogs: boolean) => {
125125 roleId : {
126126 type : "string" ,
127127 references : { model : "role" , field : "id" } ,
128- defaultValue : `" USER" ` ,
128+ defaultValue : `USER` ,
129129 } ,
130130 } ,
131131 } ,
@@ -566,16 +566,19 @@ const abac = (db: Kysely<Database>, debugLogs: boolean) => {
566566 "Unexpected error in sign-up handler:" ,
567567 unexpectedError
568568 ) ;
569-
569+
570570 // Ensure any database connections are properly cleaned up
571- if ( dbConnection && typeof dbConnection . destroy === ' function' ) {
571+ if ( dbConnection && typeof dbConnection . destroy === " function" ) {
572572 try {
573573 await dbConnection . destroy ( ) ;
574574 } catch ( cleanupError ) {
575- console . error ( "Error cleaning up database connection:" , cleanupError ) ;
575+ console . error (
576+ "Error cleaning up database connection:" ,
577+ cleanupError
578+ ) ;
576579 }
577580 }
578-
581+
579582 return {
580583 message : "Unexpected error occurred" ,
581584 error : String ( unexpectedError ) ,
@@ -613,16 +616,19 @@ const abac = (db: Kysely<Database>, debugLogs: boolean) => {
613616 "Unexpected error in sign-in handler:" ,
614617 unexpectedError
615618 ) ;
616-
619+
617620 // Ensure any database connections are properly cleaned up
618- if ( dbConnection && typeof dbConnection . destroy === ' function' ) {
621+ if ( dbConnection && typeof dbConnection . destroy === " function" ) {
619622 try {
620623 await dbConnection . destroy ( ) ;
621624 } catch ( cleanupError ) {
622- console . error ( "Error cleaning up database connection:" , cleanupError ) ;
625+ console . error (
626+ "Error cleaning up database connection:" ,
627+ cleanupError
628+ ) ;
623629 }
624630 }
625-
631+
626632 return ctx ; // Continue processing for sign-in
627633 }
628634 } ,
0 commit comments