Skip to content
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

added boolean field 'endorsed' to Post #31

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

evelynnchen-cmu
Copy link

@evelynnchen-cmu evelynnchen-cmu commented Oct 7, 2024

Resolves #24

Added a boolean field named 'endorsed' to a Post. I modeled it off of Post's other boolean fields like deleted.

Able to see the "endorsed" attribute when you go to localhost:4567/api/topic/#

image

The following files were changed because existing tests were failing:

  • src/posts/create.js: Endorsed is default set to false
  • src/posts/data.js: Added it as a field and checks if post has it as its own property
  • src/posts/user.js: Added it to getPostsFields as it is a new field in post
  • src/search.js: Was getting errors in api/serach so added it as a field to postFields
  • src/topics/create.js: Defaults to false if posts.endorsed is undefined
  • src/topics/fork.js: Added it as a field to getPostFields.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 11206960947

Details

  • 10 of 10 (100.0%) changed or added relevant lines in 7 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 82.691%

Totals Coverage Status
Change from base Build 11021287134: 0.004%
Covered Lines: 22342
Relevant Lines: 25598

💛 - Coveralls

@evelynnchen-cmu evelynnchen-cmu self-assigned this Oct 7, 2024
@evelynnchen-cmu evelynnchen-cmu added this to the Sprint 2 milestone Oct 7, 2024
Copy link

@vickyc2266 vickyc2266 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@evelynnchen-cmu evelynnchen-cmu merged commit 6c8f586 into f24 Oct 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add endorsedBy field to backend
3 participants