[WIP] Backend Implementation for Private Posting Feature #8
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.
Feature: Implementing Private Posting Feature [US03]
Summary:
This PR addresses #16 and attempts to add a field to store a flag indicating whether a post has been toggled as private to just the student and instructors or not. Eventually, this will be connected to the checkboxes implemented to toggle this flag in the frontend.
Changes Made:
Adding field to store private post flag in the backend:
Adding field to store private post flag in the schema:
Challenges Faced:
The implementation of the backend involved adding a field to store the isPrivate field which is a boolean flag to indicate whether a post is private to just the student and instructors. However, this backend implementation fell through and was not completed despite best efforts to do so. When trying to run NodeBB, there were many problems and troubleshooting the setup proved to be more challenging than expected. The main issue was getting NodeBB to run locally, as there were repeated difficulties with configuring the database and test_database properly. Additionally, the backend implementation turned out to be more complex than initially estimated because the private post feature is deeply interconnected with multiple parts of the codebase. Making changes to one file often introduced errors in other dependent files, leading to numerous failed test cases. These cascading issues made debugging and implementing the feature far more time-consuming than anticipated, ultimately causing the backend implementation to stall.
Testing:
This feature can be tested using the tests added to the unit tests which can be run using
npm run test