@@ -425,29 +425,20 @@ const roomRequestRoutes: FastifyPluginAsync = async (fastify, _options) => {
425
425
example : "sp25" ,
426
426
} ) ,
427
427
} ) ,
428
- querystring : z . object (
429
- getDefaultFilteringQuerystring ( {
430
- defaultSelect : [ "requestId" , "title" ] ,
431
- } ) ,
432
- ) ,
433
428
} ) ,
434
429
) ,
435
430
onRequest : fastify . authorizeFromSchema ,
436
431
} ,
437
432
async ( request , reply ) => {
438
433
const requestId = request . params . requestId ;
439
434
const semesterId = request . params . semesterId ;
440
- const { ProjectionExpression, ExpressionAttributeNames } =
441
- generateProjectionParams ( { userFields : request . query . select } ) ;
442
435
let command ;
443
436
if ( request . userRoles ?. has ( AppRoles . BYPASS_OBJECT_LEVEL_AUTH ) ) {
444
437
command = new QueryCommand ( {
445
438
TableName : genericConfig . RoomRequestsTableName ,
446
439
IndexName : "RequestIdIndex" ,
447
440
KeyConditionExpression : "requestId = :requestId" ,
448
441
FilterExpression : "semesterId = :semesterId" ,
449
- ProjectionExpression,
450
- ExpressionAttributeNames,
451
442
ExpressionAttributeValues : {
452
443
":requestId" : { S : requestId } ,
453
444
":semesterId" : { S : semesterId } ,
@@ -457,7 +448,6 @@ const roomRequestRoutes: FastifyPluginAsync = async (fastify, _options) => {
457
448
} else {
458
449
command = new QueryCommand ( {
459
450
TableName : genericConfig . RoomRequestsTableName ,
460
- ProjectionExpression,
461
451
KeyConditionExpression :
462
452
"semesterId = :semesterId AND #userIdRequestId = :userRequestId" ,
463
453
ExpressionAttributeValues : {
@@ -466,7 +456,6 @@ const roomRequestRoutes: FastifyPluginAsync = async (fastify, _options) => {
466
456
} ,
467
457
ExpressionAttributeNames : {
468
458
"#userIdRequestId" : "userId#requestId" ,
469
- ...ExpressionAttributeNames ,
470
459
} ,
471
460
Limit : 1 ,
472
461
} ) ;
0 commit comments