Skip to content

Conversation

@spokonya
Copy link

@spokonya spokonya commented Jan 16, 2026

Stuff added:

  • GET endpoint for users by ID
  • handler + tests
  • repository for users
  • user model

Closes #45


}

func NewUserHandler(repo UsersRepository) *UsersHandler {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NewUsersHandler

if id == "" {
return errs.BadRequest("id is required")
}
user, err := h.repo.GetUserById(c.Context(), id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Searching for an entity at the db/repository level should be prefixed with find
so the method should be named FindUserById in h.repo.FindUserById


return devs, nil
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this? Or mv it to a separate pr? It's not related to get users

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/GET users/id

3 participants