WIP: Implement Handle Tag Functionality #22
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.
This pull request adds handling tags functionality to the the request user input and attempts to save this whitelist of defaults tags.
Changes Implemented:
Problems Faced
I unfortunately did not get the default tag whitelist inputted to actually save to the database. I spent over 3 hours trying to figure where to code was passing through the form data to the backend. Once I figured out how to do that I adding passing in the users inputted default tag whitelist. However, I noticed the redirection to the newly created category didn't actually show the new default tag whitelist. I then looked at other place in the code where data was being saved and noticed the type being passed through where different so I updated the default tag whitelist to be passed through as a string, but that didn't fix it. I then noticed the return data from the newly created category had the tag whitelist as an array so I change back the way I passed the default tag whitelist. I then made sure that tag whitelist was being passed through with the form data through using console logs and it was. I went to office hours a couple times and were not able to resolve the issue. This seems to be an issue with saving things to the database and did not have enough time to learn what additional things might be required to update the database
Steps to test
From the nodeBB homepage go to admin, then manage, then categories. From the categories page click new category and you can now see an input section for a default tag whitelist.
Video Showing my Change in Action
https://drive.google.com/file/d/1FbTcDUAf0JE4wCuAsEjsrXWl1HN96G-L/view?usp=sharing
Resolves #7