File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 "license" : " ISC" ,
1818 "dependencies" : {
1919 "@hono/zod-validator" : " ^0.4.3" ,
20- "@prisma/client" : " ^5.20 .0" ,
20+ "@prisma/client" : " 5.22 .0" ,
2121 "common" : " workspace:common" ,
2222 "cookie-parser" : " ^1.4.6" ,
2323 "cors" : " ^2.8.5" ,
3535 "@types/cookie-parser" : " ^1.4.7" ,
3636 "@types/cors" : " ^2.8.17" ,
3737 "globals" : " ^15.8.0" ,
38- "prisma" : " ^5.11 .0" ,
38+ "prisma" : " 5.22 .0" ,
3939 "typescript" : " ^5.4.5"
4040 },
4141 "trustedPackages" : [" prisma" ]
Original file line number Diff line number Diff line change 22generator client {
33 provider = " prisma-client-js "
44 binaryTargets = [" native " , " debian-openssl-3.0.x " ]
5- previewFeatures = [" typedSql " ]
5+ previewFeatures = [" typedSql " , " relationJoins " ]
66}
77
88datasource db {
Original file line number Diff line number Diff line change @@ -32,5 +32,6 @@ export const prisma = new PrismaClient(
3232prisma . $on ( "query" , ( e ) => {
3333 console . log ( format ( e . query , { language : "postgresql" } ) ) ;
3434 console . log ( `Params: ${ e . params } ` ) ;
35+ console . log ( `Duration: ${ e . duration } ` ) ;
3536 console . log ( "\n" ) ;
3637} ) ;
Original file line number Diff line number Diff line change @@ -116,7 +116,6 @@ export async function getPendingRequestsToUser(
116116 include : {
117117 course : {
118118 include : {
119- enrollments : true ,
120119 slots : true ,
121120 } ,
122121 } ,
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ export async function getUser(guid: GUID): Promise<UserWithCoursesAndSubjects> {
3131 include : {
3232 course : {
3333 include : {
34- enrollments : true ,
3534 slots : true ,
3635 } ,
3736 } ,
@@ -84,7 +83,6 @@ export async function getUserByID(
8483 include : {
8584 course : {
8685 include : {
87- enrollments : true ,
8886 slots : true ,
8987 } ,
9088 } ,
@@ -147,7 +145,6 @@ export async function getAllUsers(): Promise<
147145 include : {
148146 course : {
149147 include : {
150- enrollments : true ,
151148 slots : true ,
152149 } ,
153150 } ,
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ type DecodedIdToken = admin.DecodedIdToken;
1111// THROWS: if idToken is not present in request cookie, or when the token is not valid.
1212export async function getGUID ( c : Context ) : Promise < GUID > {
1313 const idToken = c . req . header ( "Authorization" ) ;
14- if ( typeof idToken !== "string" ) error ( "token not found in query " , 401 ) ;
14+ if ( typeof idToken !== "string" ) error ( "token not found in header " , 401 ) ;
1515 return await getGUIDFromToken ( idToken ) ;
1616}
1717
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ if (corsOptions.origin.length > 1) {
3131const app = new Hono ( )
3232 . onError ( ( err , c ) => {
3333 if ( err instanceof HTTPException ) {
34+ console . error ( err ) ;
3435 c . status ( err . status ) ;
3536 return c . json ( { error : err } ) ;
3637 }
You can’t perform that action at this time.
0 commit comments