Added custom 'Resources' button to CMU Quickstart theme (testing) and implemented API route #41
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.
note: this is the final pull request but please refer back to the previous 'failed' pull requests of better commit messages that meet the guidelines. This pull request generally used all previous attempts that why there are less commit messages in it.
this pull request resolves issue #58
This pull request includes the following changes:
Cloned the CMU Quickstart theme into the node_modules directory and renamed it as "testing."
Updated the NodeBB admin panel to use the "testing" theme.
Added a partial in the theme to display the "Resources" button.
Created and pushed the modified theme to the GitHub repository: rmmahmou/nodebb-theme-testing.
Updated install/package.json to use the modified theme from the GitHub repository.
Modified the OpenAPI schema by adding the /api/resources-button route:
public/openapi/read.yaml
public/openapi/read/resources-button.yaml
Updated the API controller to handle the /api/resources-button endpoint in src/controllers/resources-button.js to return a JSON response.
Modified the index routes in src/routes/index.js to include the new /resources-button route.
Created a template to render the "Resources" button in src/views/resources-button.tpl.
Files Changed:
install/package.json: Added the new theme as a dependency.
public/openapi/read.yaml: Registered the new API route /api/resources-button.
public/openapi/read/resources-button.yaml: Documented the new route with response details.
src/controllers/resources-button.js: Created a new controller to handle the route and return a JSON response.
src/routes/index.js: Added the new route for /resources-button.
src/views/resources-button.tpl: Created the view for rendering the "Resources" button page.
Testing:
Verified that the "Resources" button renders properly in the theme.
Ensured that the /api/resources-button endpoint returns the expected JSON response ({ message: 'Resources button data retrieved successfully' }).