-
Notifications
You must be signed in to change notification settings - Fork 0
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
Integrate with frontend web app #79
Merged
Merged
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
Added the corresponding requests API endpoint test file for POST users/check API endpoint Resolved a bug in the requests API endpoint test file file for POST users API endpoint Refactored ALLOWED_USERNAME_REGEX to utils/config.js Amended Allowed username regex to only allow alphanumeric characters (uppercase letter not included as all letters will be converted lowercase letters when saved to database) and underscores Amended POST users API endpoint logic to add custom claims (username field) to firebase Authentication
Removed users.test.js test scenario where username provided is less than 6 characters in line with the removal of username minlength of 6 from user model Added additional test scenario in users.test.js when no Authorization token is provided
….test.js Refactored checkUsernameValidity as a separate method in utils/usersUtils.js for improved cohesion Resolved naming error with regards to the naming of the controller method for users/check API endpoints introduced in the previous commit
JonathanLeeWH
added
enhancement
New feature or request
db.model
Related to database models/schemas
API
Related to API endpoints
Testing
Related to testing
code quality
Related to code quality
firebase
Related to firebase
frontend integration
Related to frontend integration
labels
Nov 24, 2020
…ken method when checkDatabase argument is set to true Amended test/utils/databaseSetup.js setBackendDefaultUser method with the additional custom claims (username) for firebase Authentication (Part of frontend Integration) Amended error message for missing and invalid authentication token with consistent message
…oftware in database Added test search software API endpoint `search_software.rest` file This is to prepare for usage in frontend typeahead search bar Note: This does not use `mongodb` build in `text search` (https://docs.mongodb.com/manual/text-search/) due to lack of support for partial Potential Alternative is to use `Mongodb Atlas Search` (https://www.mongodb.com/atlas/search and https://www.mongodb.com/blog/post/mongodb-atlas-search-now-ga) but it will mean require depending on a third party service. Another alternative is to use `elasticsearch`
…endpoint Added `/api/search/software` API endpoint to allow for searching of software in database
…oftware` API endpoint Amended `search_software.rest` test API endpoint with `page` and `per_page` query params This is to prepare for pagination support in the frontend
… fields from reference to `user` to an array of string
…model Amended `software` model by changing `developedBy` and `maintainedBy` fields from reference to `user` to an array of `String`
…-software-api-endpoint Improved `search` software API endpoint
…ink` and `twitterUsername` fields Note: `videoLink` field validates if the video link is either `youtube.com` or `vimeo.com` as the plan is to initially support only youtube and vimeo as video hosting websites Amended `softwareTestUtils.js` to match the updated `software` model Amended `post_software.rest` test API endpoint file to match the updated `software` model
…e-model Improved `software` model with `shortDescription`, `pricing`, `videoLink` and `twitterUsername` fields
…ault-software-model Added missing `default` field in `software` model `twitterUsername` field
… model `meta` properties are not updated Amended `patch_softwareById.rest` test API endpoint file to `PATCH` HTTP method from `PUT` HTTP method
…-post-software-api Resolved a bug in `POST` `software` API endpoint where the `software` model `meta` properties are not updated
…PI endpoints Added `get_recentAddedSoftware.rest` and `get_recentUpdatedSoftware.rest` test API endpoints files This is to prepare for frontend integration (listing of recently added and updated software) Refactored `search_software.rest` test API endpoint file to `search` directory for consistency
…software-api-endpoints Added `api/software/added/recent` and `api/software/updates/recent` API endpoints
…not part of whitelist Refactored code with `ALLOWED_VIDEO_HOST_WHITELIST` now available in `utils/config.js` for easier configuration (Improved code quality)
…host-whitelist-bug Resolved a bug where previously video host with subdomain `www.` was not part of whitelist
… LTS which is currently Nodejs 14
JonathanLeeWH
added
the
github_actions
Pull requests that update Github_actions code
label
Oct 6, 2021
JonathanLeeWH
added
dependencies
Pull requests that update a dependency file
priority.high
High priority
Security
Related to Security
status.done
Done and ready for review and merge
labels
Oct 27, 2021
…-to-version-16-lts Amended GitHub Actions to new nodejs LTS Version `16`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
API
Related to API endpoints
code quality
Related to code quality
db.model
Related to database models/schemas
dependencies
Pull requests that update a dependency file
enhancement
New feature or request
firebase
Related to firebase
frontend integration
Related to frontend integration
github_actions
Pull requests that update Github_actions code
priority.high
High priority
Security
Related to Security
status.done
Done and ready for review and merge
Testing
Related to testing
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.
API Related
POST
users/check
API endpoint for check on username availabilityPOST
users
API endpoint logic to add custom claims (username
field) to firebase Authenticationusers/check
API endpointsapi/search/software
to allow for integration with frontend typeahead search bar component (includingpage
andper_page
query params support`Note: This does not use
mongodb
build intext search
(https://docs.mongodb.com/manual/text-search/) due to lack of support for partial text search.Potential Alternative is to use
Mongodb Atlas Search
(https://www.mongodb.com/atlas/search and https://www.mongodb.com/blog/post/mongodb-atlas-search-now-ga) but it will mean require depending on a third party service.Another alternative is to use
elasticsearch
api/software/added/recent
andapi/software/updates/recent
API endpointsPOST
software API endpoint where the software model meta properties are not updatedModel Related
minlength
of6
constraint fromuser
modelALLOWED_USERNAME_REGEX
toutils/config.js
users.test.js
when no Authorization token is providedusers/check
API endpoints inusers.test.js
developedBy
andmaintainedBy
fields from reference to user to an array ofString
Note: This is due to the fact that the developer(s) or maintainer(s) may not be a registered user
software
model with shortDescription, pricing, videoLink and twitterUsername fieldsNote:
videoLink
field validates if the video link is either youtube.com or vimeo.com as the plan is to initially support onlyyoutube
andvimeo
as video hosting websitesTest Related
POST
users/check
API endpointrequests
API endpoint test file file forPOST
users
API endpointusers.test.js
test scenario where username provided is less than6
characters in line with the removal of usernameminlength
of6
fromuser
modeltest/utils/databaseSetup.js
setBackendDefaultUser
method with the additional custom claims (username
) for firebase Authentication (Part of frontend Integration)softwareTestUtils.js
to match the updatedsoftware
modelpost_software.rest
test API endpoint file to match the updated software modelpatch_softwareById.rest
test API endpoint file toPATCH
HTTP method fromPUT
HTTP methodget_recentAddedSoftware.rest
andget_recentUpdatedSoftware.rest
test API endpoints filesOthers
username
in database forverifyAuthToken
method whencheckDatabase
argument is set totrue
checkUsernameValidity
as a separate method inutils/usersUtils.js
for improved cohesionALLOWED_VIDEO_HOST_WHITELIST
now available in utils/config.js for easier configuration (Improved code quality)To be considered
String
(license type) orurl
type (the url to license)