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

Add Ability to Toggle Posts as Answered Vs. Unanswered #17

Merged
merged 5 commits into from
Sep 25, 2024
Merged

Conversation

katcday
Copy link

@katcday katcday commented Sep 24, 2024

  • Updated Yaml files src/posts/data.js and src/posts/data.js to include new field in Jsons.
  • Updated src/api/posts.js to include an answer and unanswer API function.
  • Updated src/controllers/write/posts.js to include answer and unanswer functions that call their API counterparts and format the response.
  • Created src/posts/answer.js to handle the toggling logic and the logic of the API functions.
  • Created an event in public/src/client/topic/events.js which will handle UI change in next PR.
  • Added a test case to test/posts.js

resolves #3

@katcday katcday added this to the Sprint 1 milestone Sep 24, 2024
@katcday katcday added the Question Answered Functionality These issues relate to the ability to mark questions as answered/closed. label Sep 24, 2024
@katcday katcday marked this pull request as draft September 24, 2024 18:57
@coveralls
Copy link

coveralls commented Sep 24, 2024

Pull Request Test Coverage Report for Build 11025214522

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 17 of 25 (68.0%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.008%) to 82.658%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/api/posts.js 3 4 75.0%
src/posts/answer.js 10 11 90.91%
src/controllers/write/posts.js 2 8 25.0%
Totals Coverage Status
Change from base Build 11001689541: -0.008%
Covered Lines: 22340
Relevant Lines: 25607

💛 - Coveralls

@katcday katcday marked this pull request as ready for review September 24, 2024 19:01
Copy link

@KesterTan KesterTan left a comment

Choose a reason for hiding this comment

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

LGTM, flow works well and API call is working as expected

@katcday katcday merged commit 64d9e6f into f24 Sep 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Answered Functionality These issues relate to the ability to mark questions as answered/closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a backend attribute to each post that indicates whether it is answered/closed or not.
3 participants