-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from KinanaDB/Team
Team Controller
- Loading branch information
Showing
10 changed files
with
390 additions
and
111 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,4 +58,124 @@ Content-Type: application/json | |
|
||
{ | ||
"teamId": 1 | ||
} | ||
|
||
|
||
//______________________________________________________ | ||
|
||
### | ||
// Register user | ||
|
||
POST http://localhost:3000/register | ||
Content-Type: application/json | ||
|
||
{ | ||
"email": "[email protected]", | ||
"username": "salma", | ||
"password": "1234" | ||
} | ||
|
||
### | ||
// Login user | ||
|
||
POST http://localhost:3000/login | ||
Content-Type: application/json | ||
|
||
{ | ||
"email": "[email protected]", | ||
"password": "1234" | ||
} | ||
|
||
### | ||
// Create team | ||
|
||
POST http://localhost:3000/team | ||
Content-Type: application/json | ||
|
||
{ | ||
"teamName": "team9" | ||
} | ||
|
||
### | ||
// Add member to team | ||
|
||
PUT http://localhost:3000/team/member | ||
Content-Type: application/json | ||
|
||
{ | ||
"memberEmail": "[email protected]", | ||
"teamId": 5 | ||
} | ||
|
||
### | ||
// Get code of team | ||
|
||
PUT http://localhost:3000/team/code | ||
Content-Type: application/json | ||
|
||
{ | ||
"teamId": 9 | ||
} | ||
|
||
|
||
### | ||
// Join a team | ||
|
||
PUT http://localhost:3000/team/join | ||
Content-Type: application/json | ||
|
||
{ | ||
"token": "2c1ce63e" | ||
} | ||
|
||
|
||
### | ||
// Update team | ||
|
||
PUT http://localhost:3000/team | ||
Content-Type: application/json | ||
|
||
{ | ||
"newName": "sssss", | ||
"teamId": 9 | ||
} | ||
|
||
### | ||
// Get all users of the team | ||
|
||
GET http://localhost:3000/team/member | ||
Content-Type: application/json | ||
|
||
{ | ||
"teamId": 7 | ||
} | ||
|
||
### | ||
// List all teams of the user | ||
|
||
GET http://localhost:3000/team | ||
Content-Type: application/json | ||
|
||
|
||
|
||
### | ||
// Delete member from team | ||
|
||
DELETE http://localhost:3000/team/member | ||
Content-Type: application/json | ||
|
||
{ | ||
"memberEmail": "[email protected]", | ||
"teamId": 4 | ||
} | ||
|
||
|
||
### | ||
// Delete team | ||
|
||
DELETE http://localhost:3000/team | ||
Content-Type: application/json | ||
|
||
{ | ||
"teamId": 8 | ||
} |
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
Oops, something went wrong.