Skip to content

Commit

Permalink
Add page view count endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanrdoherty committed Sep 19, 2024
1 parent 1d2bf25 commit a47955c
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import javax.ws.rs.BadRequestException;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
Expand Down Expand Up @@ -123,6 +124,14 @@ public StreamingOutput getMetrics() {
};
}

@GET
@Path("/metrics/count-page-view/{clientPath:.+}")
@Produces(MediaType.APPLICATION_JSON)
public Response registerVisit(@PathParam("clientPath") String clientPath) {
LOG.trace("Registered visit to /" + clientPath);
return Response.noContent().build();
}

@GET
@Path("/metrics/searches")
@Produces(MediaType.APPLICATION_JSON)
Expand Down

0 comments on commit a47955c

Please sign in to comment.