EagleEye contents with actions#483
Merged
joanreyero merged 37 commits intoFeb 8, 2023
Merged
Conversation
Collaborator
Author
|
@joanreyero one question: I'm not sure what to do with |
Contributor
|
@anilb0stanci I re-wrote this so it does not need the old EagleEye |
This file contains hidden or 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
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.
Changes proposed ✍️
To upsert content into the database:
POST /api/eagleEyeContentUpserts eagle eye content using post URL. If a post doesn't exist on our database yet, we also support sending actions along with it. (ie: on create we support adding actions to content, but on update we don't -> on existing content, one should be using the new action endpoints)
An example body payload when creating a fresh eagle eye content:
To create an action for an eagle eye post:
POST /api/eagleEyeContent/:contentId/actionsThis endpoint also makes sure that, when a mutually exclusive action (:+1: or :-1: ) is sent, the counterpart is deleted. IE: When sending a thumbs-up or thumbs-down action, we don't have to send another request to delete the counterpart.
To delete an action for an eagle eye post:
DELETE /api/eagleEyeContent/:contentId/action/:actionIdTo list eagle eye posts with filtering:
POST /api/eagleEyeContent/querySome example body payloads for various filters:
This will return all actions of the matched content (ie: if content has at least one bookmark, it'll be returned with all of its actions)
Checklist ✅
Feature,Enhancement, orBug.frontend/.env.dist.local,frontend/.env.dist.composed.backend/.env.dist.local,backend/.env.dist.composed.