generated from BuildForSDG/js-starter
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Ft/23 link backend frontend #24
Open
tanerochris
wants to merge
58
commits into
develop
Choose a base branch
from
ft/23-link-backend-frontend
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
- set content type for catchall error response
- workaround for JS Object destructuring inside an if block considered error by codacity
- Updated readme file - Added schemas and model related to project feature - Created an all model file to import into database ,prevents previous error from mongoose "cannot overrite model already compiled" - Added ApiErrorResponse class to manage api errors - Wrote tests for Project feature endpoints - Updated setupTests.js with code to run before and after test suits run - rename auth directory to user to match docs api endpoints close #14
- Updated readme file - Added schemas and model related to project feature - Created an all model file to import into database ,prevents previous error from mongoose "cannot overrite model already compiled" - Added ApiErrorResponse class to manage api errors - Wrote tests for Project feature endpoints - Updated setupTests.js with code to run before and after test suits run - rename auth directory to user to match docs api endpoints close #14
- Updated readme file - Added schemas and model related to project feature - Created an all model file to import into database ,prevents previous error from mongoose "cannot overrite model already compiled" - Added ApiErrorResponse class to manage api errors - Wrote tests for Project feature endpoints - Updated setupTests.js with code to run before and after test suits run - rename auth directory to user to match docs api endpoints close #14
- added jest options --forceExit --detectOpenHandles --maxWorkers=10 to exit jest when all test pass close #14
- fix codacy fail error close #14
- fix codacy fail error close #14
OpenAPI 3.0 design Yaml and JSON files closes #6
Added instructions to run API endpoint documentation Added link to external docs close
- add project schema - add user schema
- create, view, list and delete project - added app.js file to extend nextjs - refactored model imports to commonjs - added prop-types closes #15
- create, view, list and delete project - added app.js file to extend nextjs - refactored model imports to commonjs - added prop-types closes #15
- create, view, list and delete project - added app.js file to extend nextjs - refactored model imports to commonjs - added prop-types closes #15
- create, view, list and delete project - added app.js file to extend nextjs - refactored model imports to commonjs - added prop-types closes #15
merged the different PRs closes #23
merged the different PRs closes #23
merged the different PRs closes #23
Hey @tanerochris, I noticed you are using // in /api/user/login.js
...
const User = mongoose.model('User');
...
// use User to do operations Within the api routes without strictly importing all the models on the path to the said route. this isn't too good as you may request a model which is not already registered, so explicitly requesting a model from the file will be better. |
This change enables features on babel like optional chaining, and removes eslint errors related to the features
Next internally sets a .json .send methods on the response object
- remove UserHeader, use AppHeader instead
KaiserPhemi
previously approved these changes
Jun 12, 2020
All models are imported/loaded/registered before the app actually runs,
that's done in app.js, using glob module which gets all model the file
paths by pattern. Importing a module by filepath, in case an adjustment is
done to a file path then will mean changing all reference of this path in
the different files it was used unlike loading it and just calling it as I
did.
…On Sat, Jun 6, 2020 at 10:07 PM Rodrick Nfinyoh M ***@***.***> wrote:
Hey @tanerochris <https://github.com/tanerochris>, I noticed you are using
// in /api/user/login.js
...const User = mongoose.model('User');
...
// use User to do operations
Within the api routes without strictly importing all the models on the
path to the said route. this isn't too good as you may request a model
which is not already registered, so explicitly requesting a model from the
file will be better.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#24 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACC3JXMOVHA2Z2MZWKEVLD3RVMN7TANCNFSM4NSCJXOQ>
.
--
My twitter @tanerochris
What I've built https://tchizer.com
Developer Circle Buea Lead facebook.com/groups/DevCBuea/
Whatsapp +237 678431904
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Merged all existing PRs
#20 #16 #22
How Has This Been Tested?
No test is written for the front end , just backend API endpoints.
Screenshots (if applicable, else remove this line / section)
Checklist: