feat(teams-board) Added team board support for all behaviour of a team board#94
Open
moffatethan wants to merge 8 commits into
Open
feat(teams-board) Added team board support for all behaviour of a team board#94moffatethan wants to merge 8 commits into
moffatethan wants to merge 8 commits into
Conversation
… & model methods, reverted model index file
…nd fixed middleware bug
…s teams where user is collaborator in
…created by them transfer to the owner
Open
jonmmyers
approved these changes
Jun 10, 2021
jonmmyers
left a comment
Collaborator
There was a problem hiding this comment.
Looks great. Nice job implementing the middleware to clean up the controllers!
Comment on lines
+1
to
+9
| const asyncHandler = require("express-async-handler"); | ||
| const { validationResult } = require("express-validator"); | ||
|
|
||
| exports.checkForValidationErrors = asyncHandler(async (req, res, next) => { | ||
| const errors = validationResult(req); | ||
| if (!errors.isEmpty()) return next(errors); | ||
|
|
||
| return next(); | ||
| }); |
Collaborator
There was a problem hiding this comment.
I see what you were getting at with using custom middleware to DRY up the error checking in the controllers!
| **Content:** `{ error: "isAdmin must be a proper boolean" }` | ||
|
|
||
| - **Code:** 400 BAD REQUEST <br /> | ||
| **Content:** `{ error: "Please provide a proper user id" }` |
Collaborator
There was a problem hiding this comment.
Nice! Bringing the strong documentation game 💪
This file contains hidden or 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
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.
What this PR does (required):
Screenshots / Videos (required):
Any information needed to test this feature (required):
teams_api_documentation.mdto get started on creating a teamAny issues with the current functionality (optional):