-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: update models and add unique viewers endpoint #194
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ayushtom
changed the title
feat: analytics
feat: update models and add unique viewers endpoint
Mar 6, 2024
ayushtom
force-pushed
the
ayush/update-endpoints
branch
from
March 6, 2024 11:19
8729cee
to
03c73fa
Compare
Th0rgal
requested changes
Mar 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To check: compatibility with nginx reverse proxy
Please only store the ip address and not the port
feat: add analytics endpoints
Th0rgal
approved these changes
Mar 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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