Skip to content

Add total owner count page using /owners/count endpoint #1916

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

namaskrutipal
Copy link

  • Added countOwners() method in OwnerRepository using a JPQL query.
  • Added /owners/count GET endpoint in OwnerController to show total owners.
  • Created a new Thymeleaf template ownerCount.html to display the result.

@dsyer
Copy link
Member

dsyer commented Jun 13, 2025

I don't think this is needed, really. Any other opinions?

public String countOwners(Model model) {
int count = owners.countOwners();
model.addAttribute("count", count);
return "owners/ownerCount"; // we'll create this HTML view next
Copy link
Contributor

Choose a reason for hiding this comment

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

Any tests?

public String countOwners(Model model) {
int count = owners.countOwners();
model.addAttribute("count", count);
return "owners/ownerCount"; // we'll create this HTML view next
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment already not needed

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.

3 participants