Skip to content

Commit 90d618b

Browse files
authored
Fix Room Requests query (#143)
1 parent c26f7e2 commit 90d618b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/api/routes/roomRequests.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,10 @@ const roomRequestRoutes: FastifyPluginAsync = async (fastify, _options) => {
198198
} else {
199199
command = new QueryCommand({
200200
TableName: genericConfig.RoomRequestsTableName,
201-
KeyConditionExpression: "semesterId = :semesterValue",
202-
FilterExpression: "begins_with(#hashKey, :username)",
201+
KeyConditionExpression:
202+
"semesterId = :semesterValue AND begins_with(#sortKey, :username)",
203203
ExpressionAttributeNames: {
204-
"#hashKey": "userId#requestId",
204+
"#sortKey": "userId#requestId",
205205
},
206206
ProjectionExpression: "requestId, host, title, semester",
207207
ExpressionAttributeValues: {

0 commit comments

Comments
 (0)