feat(teams) Created initial teams back-end controller (invites, collaborators, creating teams)#91
feat(teams) Created initial teams back-end controller (invites, collaborators, creating teams)#91moffatethan wants to merge 19 commits intomainfrom
Conversation
…authenticated user when creating invite
… added users invites route
|
Team boards PR cleans up code a bit more removes repeated error checking in the controller handlers to its own middleware to make our controllers even leaner. |
|
|
||
| return res.status(200).json({ | ||
| message: "Team created successfully!", | ||
| payload: team, |
There was a problem hiding this comment.
Can we change this to be namespaced under team? so { message: "Team created successfully!", team: team} to maintain consistency with boards
There was a problem hiding this comment.
With how teams context is setup the actions accept payloads conventionally this makes more sense to pass the payload to the reducer.
| { timestamps: true } | ||
| ); | ||
|
|
||
| module.exports = { Card: mongoose.model("card", cardSchema), cardSchema }; |
There was a problem hiding this comment.
This will be adapted in the BE branch @street-jackal and I are working on
There was a problem hiding this comment.
Okay, when everything is merged in I will refactor for this to work with the new changes.
| module.exports = { | ||
| Column: mongoose.model("column", columnSchema), | ||
| columnSchema, | ||
| }; |
There was a problem hiding this comment.
Same with the model here like Card.js
amahalwy
left a comment
There was a problem hiding this comment.
Left some comments; otherwise, looks great!
What this PR does (required):
Screenshots / Videos (required):
Will update with a video walkthrough in future.
Any information needed to test this feature (required):
{ "name": "Name here" }Any issues with the current functionality (optional):
- I am working on supporting creating boards as a team and adding collaborators in a board for a separate PR.