-
Notifications
You must be signed in to change notification settings - Fork 11
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
modify non-handler methods to not write a response #122
Conversation
03f6a85
to
f36d90d
Compare
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.
LGTM, just curiosity question
api/invite.go
Outdated
a.logger.Infof("invited [%s] user is already a member of the care team of %v", ib.Email, invitorID) | ||
log.Println(statusExistingMemberMessage) |
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.
Just curious: any reason to bring this log.Println
to the top-level code instead of leaving in checkAccountAlready...
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.
Nope, overzealous cut & paste. I'll fix really quick.
f36d90d
to
a1de665
Compare
In prepping the send invitation endpoint for care partner alerting, it has become necessary to have a new endpoint that won't error immediately when an invitee already has an accepted invitation from the invitor. Since checking for duplicate invitations is firmly in the realm of business logic, this separation also makes sense, as keeping transport logic (HTTP-related things) separate from business logic makes for easier understanding and simpler tests too. Part of BACK-2500
In prepping the send invitation endpoint for care partner alerting, it has become necessary to have a new endpoint that won't error immediately when an invitee already has an accepted invitation from the invitor. Since checking for Care Team membership is firmly in the realm of business logic, this separation also makes sense, as keeping transport logic (HTTP-related things) separate from business logic makes for easier understanding and simpler tests too. Part of BACK-2500
232da37
to
18d6bc3
Compare
Heh, had to force push to prevent that ugly merge commit. :D |
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.
LGTM, still :)
In prepping the send invitation endpoint for care partner alerting, it has become necessary to have a new endpoint that won't error immediately when an invitee already has an accepted invitation from the invitor.
Since checking for duplicate invitations is firmly in the realm of business logic, this separation also makes sense, as keeping transport logic (HTTP-related things) separate from business logic makes for easier understanding and simpler tests too.
Part of BACK-2500