AthletiFi / athletifi-website

Official website for AthletiFi
https://www.athleti.fi
1 stars 5 forks source link

Update writerUserSignUp lambda function to add the user_id into the owner column of card_images table #318

Closed qisforq closed 3 weeks ago

qisforq commented 3 weeks ago

Ensure that this logic only runs if the invite_id is one of the 60 invite_ids for the incoming parents

chef-louis commented 3 weeks ago

The writeUserSignUp lambda function has been updated to include a check when the card associated with the invite_id doesn't have an owner yet then the next user's id will be assigned the owner of that card. If an owner already exists for that card then this logic is skipped.

chef-louis commented 3 weeks ago

To streamline the designation for when this check is applied, I've added a field into the invitations table where the invite_type needs to be set to set_owner in order for the lambda function to check if the owner needs to be updated