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
[x] New feature (adds functionality)
[x] Bug fix (fixes an issue)
[ ] Breaking changes (causes defects to existing pieces)
Screenshots
Checklist:
[x] I have read and complied with the CONTRIBUTING document
[x] The changes I've made follow the existing code style and formatting requirements
[ ] My changes require updates to the documentation, which I have modified accordingly
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: