-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Joana Maia <[email protected]>
- Loading branch information
1 parent
3967c6c
commit 5bb4bf7
Showing
21 changed files
with
383 additions
and
38 deletions.
There are no files selected for viewing
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
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
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 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import Permissions from '../../security/permissions' | ||
import MemberService from '../../services/memberService' | ||
import PermissionChecker from '../../services/user/permissionChecker' | ||
|
||
/** | ||
* GET /tenant/{tenantId}/member/{id} | ||
* @summary Find a member | ||
* @tag Members | ||
* @security Bearer | ||
* @description Find a single member by ID. | ||
* @pathParam {string} tenantId - Your workspace/tenant ID | ||
* @pathParam {string} id - The ID of the member | ||
* @response 200 - Ok | ||
* @responseContent {MemberResponse} 200.application/json | ||
* @responseExample {MemberFind} 200.application/json.Member | ||
* @response 401 - Unauthorized | ||
* @response 404 - Not found | ||
* @response 429 - Too many requests | ||
*/ | ||
export default async (req, res) => { | ||
new PermissionChecker(req).validateHas(Permissions.values.memberRead) | ||
|
||
const payload = await new MemberService(req).findGithub(req.params.id) | ||
|
||
await req.responseHandler.success(req, res, payload) | ||
} |
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
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
Oops, something went wrong.