Skip to content

feat(teams) Created initial teams back-end controller (invites, collaborators, creating teams)#91

Open
moffatethan wants to merge 19 commits intomainfrom
feat-be-teams
Open

feat(teams) Created initial teams back-end controller (invites, collaborators, creating teams)#91
moffatethan wants to merge 19 commits intomainfrom
feat-be-teams

Conversation

@moffatethan
Copy link
Contributor

What this PR does (required):

  • Provides teams support in the API.
  • Invites controller for adding collaborators with email support.
  • Adding and removing collaborators with authorization.

Screenshots / Videos (required):

Will update with a video walkthrough in future.

Any information needed to test this feature (required):

  • Login as a user
  • POST /teams with a body { "name": "Name here" }
  • I will be updating this PR with the MD file for API documentation on working with this integration so front-end work will be a bit more easier.

Any issues with the current functionality (optional):

  • All works just fine for the creating teams.
    - I am working on supporting creating boards as a team and adding collaborators in a board for a separate PR.

@moffatethan
Copy link
Contributor Author

moffatethan commented Jun 7, 2021

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change this to be namespaced under team? so { message: "Team created successfully!", team: team} to maintain consistency with boards

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be adapted in the BE branch @street-jackal and I are working on

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with the model here like Card.js

Copy link
Contributor

@amahalwy amahalwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments; otherwise, looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants