This repository was archived by the owner on May 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Master to prod #63
Merged
Master to prod #63
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reworked documentation to be more organized and provide more information. Removed redundant 'Types' documentation, expanded 'README.md' in 'docs' directory, and updated primary 'README.md' to reflect new documentation structure. Implemented separate directories for API reference, internal architecture, contribution guidelines, and code of conduct. This restructure was to enhance readability and understanding of the project for both contributors and users alike."
Rearranged existing documentation files for better comprehension and ease of access. With a new 'npm run staging' command added, 'available-scripts.md' has been moved from 'old' directory to 'internal' directory and renamed to 'scripts.md'; this also includes a new 'Scripts' section in 'README.md'. 'CONTRIBUTING.md' has been updated for better collaboration instructions.
Created a new template for API endpoint documentation and added detailed references for new /api/auth/google-login endpoint. The template includes endpoint description, request parameters, request body, headers, response structure, response codes, and cookies. The /api/search/feeling-lucky endpoint was also added to the API reference README. These changes are required to provide clear documentation for the new endpoints and to utilize a standard template for future endpoint documentation.
Implemented a new route in the roadmaps for fetching progress data and updated the Paths constants file with the new route. Also, added response handlers for situations when roadmap progress is found or not found. All these changes were done mainly for enhancement in data retrieval and user experience.
Implemented a profanity filter under utility directory. This includes a ProfanityFilterUtil.ts file consisting of functions to check strings and objects for profane words. It is accompanied by a WordList.ts file that contains a list of bad word patterns. These additions are aimed at preventing misuse of our platform by limiting language that could be offensive or inappropriate.
Introduced a profanity checker logic to screen the content of roadmaps during creation or update. The created or updated roadmap is set to 'public' only when it passes through the profanity check. This validation is done by the new validation functions added to 'validateRoadmapData.ts'. Aimed at maintaining a more cordial environment on the platform.
Enhanced profanity filter with 'checkWordProfanity' to check individual words in a string, ensuring a more accurate filtering. Applied this new filter to roadmap titles and descriptions in 'validateRoadmapIsProfane.ts' to prevent posting inappropriate content. Filter now also functions with case-insensitive regex, addressing variability in text case. Effort to uphold a respectful community environment.
To promote a respectful community, roadmaps containing profanity are now automatically flagged as drafts. A new condition has been added to roadmapController to implement this. If a roadmap fails the profanity check (isPublic equals false), it's marked as draft and will require a manual review before being visible publicly. This applies universally to all instances where a roadmap is created or updated.
Word filter
`checkEmail` function from `EmailUtil.ts` is moved to `misc.ts` for simplification. `EmailUtil` only contained a single function and was deemed unnecessary, thus it was deleted. The reference to `checkEmail` from `authController.ts` is updated accordingly.
This commit adds a check in the roadmapController to disallow publishing a roadmap when the roadmap is not public. This also adds a new response sent by calling the new responseCantPublishDraft function, which sends an error message indicating that a draft cannot be published if it's unlisted because of inappropriate content.
This commit adds detailed API documentation for the auth endpoints in our application. These include endpoints for GitHub login/callback, Google login/callback, user login/registration, password change, and user logout. The documentation describes the request/response structure for these endpoints, helping to clarify their usage and expected behavior. Also, the google-login.md is updated by extending the response codes section. Links in README.md are updated and not-implemented endpoints have been labelled accordingly.
This commit removes outdated API documentation for auth endpoints. These files were in the old docs folder and were no longer relevant as our API structure and functionality have undergone significant changes. Cleaning up these files helps reduce confusion for developers by ensuring only up-to-date and accurate documentation is available.
The versions of the "navigolearn-front" and "navigo-learn-api" are updated from "2.0.1" to "2.0.2" in package.json and package-lock.json files. This version bump reflects the recent additions to the application, particularly the addition of the 'feeling lucky' functionality to the Explore feature.
Made changes in ExploreDB.ts to handle null values in SQL queries, specifically in the counting of 'likeCount' and 'isLiked'. This is important to ensure data integrity and avoid runtime errors when these fields are not available. Also, limited the 'isLiked' subquery to one result to prevent unnecessary data. As a debugging measure, console.log has been added to log the 'result'. This will help monitor the output of the queries, but should be removed in production.
…oncerns This commit refactors the ExploreDB methods to increase readability, cleanliness, and maintain separation of concerns. Previously, the getRoadmaps method contained a large amount of code dedicated to building the SQL queries and their parameters. These tasks have now been separated out into private methods within the ExploreDB class (getIsLikedQuery, getTopicQuery, getOrderByQuery, buildQueryParams). This refactor results in a getRoadmaps method that is easier to read and understand. The logic for generating the SQL queries and their parameters is now encapsulated within their own methods.
Fixed condition that pushes userid and topic into params in ExploreDB.ts. The changes ensure that the userid only gets added when it is not a countQuery and there is a valid userid. Additionally, the logic for handling an array of topics has been updated to spread the array values instead of pushing the entire array.
Enhanced search parameter validation to handle cases when parameters are undefined or null. Code was added to fall back to default parameters, ensuring valid search queries and preventing failure. Predicate functions were introduced to simplify and clarify the validation logic of topics. This refactor increases reliability of the search feature.
Changes include switching to 'RoadmapsUpdate.all' in RoadmapsUpdate.ts to apply 'validateSession' for all types of HTTP requests. This change is deemed necessary for better session validation. Also in Paths.ts, the Like and Dislike paths were streamlined from '/:roadmapId([0-9]+)/like' and '/:roadmapId([0-9]+)/dislike' to '/like' and '/dislike' respectively to simplify their structure. Please note that in this case, the roadmapId will have to be passed in the request body or as a query parameter.
Implemented a new route in the roadmaps for fetching progress data and updated the Paths constants file with the new route. Also, added response handlers for situations when roadmap progress is found or not found. All these changes were done mainly for enhancement in data retrieval and user experience.
This commit includes documentation for two new search API endpoints. The first is "GET /api/search/feeling-lucky" which returns the id of a random roadmap. The second is "GET /api/search/roadmaps" which is used to search for roadmaps by name and description. These documentations provide essential information on how to use these new search functionalities, detailing the request parameters, body, headers and responses.
# Conflicts: # package-lock.json # package.json # src/helpers/responses/roadmapResponses.ts
Added new API documentation for creating, getting, and updating the roadmap. This documentation includes detailed explanations of the request parameters, bodies, response codes, etc. The roadmap sections in API references README were updated and the typographical errors in various other documentation files were fixed.
The API docs now require an authentication token in the headers for operations on roadmaps. Moreover, documentation for new API routes: delete-roadmap, update-roadmap-progress, get-roadmap-progress, delete-roadmap-like, unlike-roadmap, like-roadmap is included.
Added detailed API documentation for new features involving user account actions. These include getting user's profile, following/unfollowing user, getting user's roadmap list, deleting a user and others.
This commit includes detailed documentation for endpoints specifics on how to update a user's name, bio, quote, website url, and Github url. It also acknowledges that the update user profile picture feature is not currently implemented by adding a notice in the corresponding doc file. Lastly, the README is updated to reference these newly added doc files.
This commit corrects a syntax error in the link for updating users in the API reference documentation. The extraneous single quotation mark was removed to ensure the hyperlink correctly navigates to the update-user.md file.
Introduced the ability for users to post a bio to their profile. This has been achieved by adding usersPostProfileBio to the list of import statements as well as to the UserUpdate routes. Also, usersPostProfileBio function is implemented in usersController to handle and save the new information to the database.
Docs update
This commit updates the minimum required NodeJS version from 16 to 18 in the package.json file. This change was necessary due to the new features/dependencies introduced in the project that require NodeJS 18 or higher. In addition, the README file got updated to reflect this requirement. It now indicates that NodeJS 18 (LTS) or higher is necessary. MariaDB version also updated to 10.11 (LTS) for clarity.
sopyb
added a commit
that referenced
this pull request
Sep 25, 2023
Merge pull request #63 from NavigoLearn/master
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.