-
Notifications
You must be signed in to change notification settings - Fork 26
Backend: REST API docs #38
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
Conversation
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.
Approved, with minor comments
|
||
// GetAssignmentsForUserExperiment returns the experiments for the logged user and a given experiment | ||
// if these assignments does not already exist, they are created in advance | ||
func GetAssignmentsForUserExperiment() RequestProcessFunc { |
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.
Instead of saying it returns something, should it be "returns a function that..."?
Also, do you mean returns the assignments? And "these assignments do not"
server/handler/render.go
Outdated
w.Write(content) | ||
} | ||
|
||
// RequestProcessFunc is the function that takes a http.Request, and returns a serializer.Response and an error |
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.
an http
|
||
// ErrNoAssignmentsInitialized is the error returned when are requested the Assignments of a User | ||
// for a given Experiment, but they has not been yet created | ||
var ErrNoAssignmentsInitialized = fmt.Errorf("No assignments initialized") |
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.
is the error returned when the Assignments of a User are requested
for a given Experiment, but they have not been yet created
server/repository/users.go
Outdated
|
||
func (r *Users) Get(id int) (*model.User, error) { | ||
// Get returns the User identified by the passed ID. | ||
// If the user does not exists, if returns no user nor error |
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.
does not exist,
003d739
to
468f689
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.
@dpordomingo Great job! Thank you for addressing all feedback fast.
In this case though, it's not clear what is the motivation to have a documentation update in a different PR than #37.
In my experience, having doc update at the same PR where new features/code is added (may be as a separate commit) simplifies both, review and merge processes.
it was my suggestion to make a separate PR to avoid blocking #37 in case there will be many comments. |
468f689
to
8081f68
Compare
8081f68
to
697a5d7
Compare
@dpordomingo I remember I left a comment about the name of wrapper |
I also tried to look for it too because I also remembered it, but I could not find so I just disregarded it 🤕 Thanks for reviewing it again. I'd suggest continuing with it in a separated issue #46 |
Depends on #37 and #43
Documents the backend public things → only the last commits: 468f689, 6431393, 468f689