PrayTeam / scriptured-prayer

GNU Affero General Public License v3.0
1 stars 0 forks source link

Feat/logging swipes #109

Closed GreeneGunnar14 closed 3 weeks ago

GreeneGunnar14 commented 2 months ago

Logging Swipes for logged in users.

Description

Added functionality to the PrayerDeck component to keep track of the current card's id and log each swipe if the user is authenticated. This included adding a new method to userCards in the useApi hook.

Reason

Cards need to be logged when prayed to curate the daily decks for each user. Related to #99

How this has been tested

I tested by swiping through the Names of God deck and checking the messages logged by the backend to ensure the server was receiving the correct requests. I also checked that new UserCardPrayed objects were being created in the database. I also checked that users who weren't logged in could still access and swipe through the prayer deck

Types of changes

Screenshots

Checklist: