Skip to content

Commit

Permalink
fix: is it because of the space
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonNotJson committed Sep 17, 2023
1 parent 1c9beff commit b305bda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lambda/patch-thread/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def patch_thread(board_id, uid, thread_id, thread, action):
"thread_id": thread_id,
},
UpdateExpression='ADD likes :uid',
ConditionExpression='attribute_not_exists(likes) OR NOT contains (likes, :uid)',
ConditionExpression='attribute_not_exists(likes) OR NOT contains(likes, :uid)',
ExpressionAttributeValues={
':uid': {uid}
},
Expand Down Expand Up @@ -69,7 +69,7 @@ def patch_thread(board_id, uid, thread_id, thread, action):
"thread_id": thread_id,
},
UpdateExpression='DELETE likes :uid',
ConditionExpression='attribute_exists(likes) AND contains (likes, :uid)',
ConditionExpression='attribute_exists(likes) AND contains(likes, :uid)',
ExpressionAttributeValues={
':uid': {uid}
},
Expand Down

0 comments on commit b305bda

Please sign in to comment.