add a unique page visit endpoint which will add the user's ip address and the page id if it is is his first visit.
For the first task-
The completed_tasks and achieved collection's models are updated with a required timestamp field of type i64 (we save in unix). We also add these changes to the upsert_completed_task and upsert_completed_achievement since these two functions interact with the collections exclusively.
In this PR we do the following things -
For the first task-
completed_tasks
andachieved
collection's models are updated with a requiredtimestamp
field of type i64 (we save in unix). We also add these changes to theupsert_completed_task
andupsert_completed_achievement
since these two functions interact with the collections exclusively.timestamp
field here https://github.com/starknet-id/upgrade_quest_db/pull/1For the second task -
/unique_page_visit
route which accepts apage_id
param. The quest pages are identified by some instructions i added in thisviewer_ip
andviewer_page_id
already exist then we don't add it to our collection. The output looks something like this