@@ -425,29 +425,20 @@ const roomRequestRoutes: FastifyPluginAsync = async (fastify, _options) => {
425425 example : "sp25" ,
426426 } ) ,
427427 } ) ,
428- querystring : z . object (
429- getDefaultFilteringQuerystring ( {
430- defaultSelect : [ "requestId" , "title" ] ,
431- } ) ,
432- ) ,
433428 } ) ,
434429 ) ,
435430 onRequest : fastify . authorizeFromSchema ,
436431 } ,
437432 async ( request , reply ) => {
438433 const requestId = request . params . requestId ;
439434 const semesterId = request . params . semesterId ;
440- const { ProjectionExpression, ExpressionAttributeNames } =
441- generateProjectionParams ( { userFields : request . query . select } ) ;
442435 let command ;
443436 if ( request . userRoles ?. has ( AppRoles . BYPASS_OBJECT_LEVEL_AUTH ) ) {
444437 command = new QueryCommand ( {
445438 TableName : genericConfig . RoomRequestsTableName ,
446439 IndexName : "RequestIdIndex" ,
447440 KeyConditionExpression : "requestId = :requestId" ,
448441 FilterExpression : "semesterId = :semesterId" ,
449- ProjectionExpression,
450- ExpressionAttributeNames,
451442 ExpressionAttributeValues : {
452443 ":requestId" : { S : requestId } ,
453444 ":semesterId" : { S : semesterId } ,
@@ -457,7 +448,6 @@ const roomRequestRoutes: FastifyPluginAsync = async (fastify, _options) => {
457448 } else {
458449 command = new QueryCommand ( {
459450 TableName : genericConfig . RoomRequestsTableName ,
460- ProjectionExpression,
461451 KeyConditionExpression :
462452 "semesterId = :semesterId AND #userIdRequestId = :userRequestId" ,
463453 ExpressionAttributeValues : {
@@ -466,7 +456,6 @@ const roomRequestRoutes: FastifyPluginAsync = async (fastify, _options) => {
466456 } ,
467457 ExpressionAttributeNames : {
468458 "#userIdRequestId" : "userId#requestId" ,
469- ...ExpressionAttributeNames ,
470459 } ,
471460 Limit : 1 ,
472461 } ) ;
0 commit comments