Skip to content

Commit fba1a87

Browse files
authored
Merge pull request #89 from ModusCreateOrg/ADE-197
Add userId to ConditionExpression query
2 parents 3c642a0 + 8e02138 commit fba1a87

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

backend/src/reports/reports.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ export class ReportsService {
427427
id,
428428
}),
429429
UpdateExpression: 'SET bookmarked = :bookmarked, updatedAt = :updatedAt',
430+
ConditionExpression: 'userId = :userId', // Add condition to ensure we're updating the right user's report
430431
ExpressionAttributeValues: marshall({
431432
':bookmarked': bookmarked,
432433
':updatedAt': new Date().toISOString(),

0 commit comments

Comments
 (0)