-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: refresh invite link #664
base: dev
Are you sure you want to change the base?
Conversation
|
||
@Post(':orgId/invite/:inviteId/refresh') | ||
async refreshInvitation(@Param('orgId') orgId: string, @Param('inviteId') inviteId: string) { | ||
if (isUUID(orgId, 4)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validation is best handled in the controllers. Service layer is for your bussiness logic
{ | ||
status_code: 400, | ||
error: 'Bad Request', | ||
message: 'Invalid organisation ID format', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use constants where possible to make code cleaner and maintainable. Hardcoded strings just leaves room for errors
What does the PR do?
This PR refreshes an invitation link.
How should this be manually tested?
It can be manually tested by sending a
POST
request to/api/v1/organizations/:organisationId/invite/:inviteId/refresh
Success Response
Error Response
400 Bad Request
401 Unauthorized Access
403 Forbidden
404 Not Found (Invitation)
404 Not Found (Organization)
Tasks
Reference Issue
https://linear.app/team-bingo/issue/BAC2-35/refresh-invite-link-or-193