From 142c1520e7dfbd25afe8d3152fdbf96f964e2aa0 Mon Sep 17 00:00:00 2001 From: John Watkins <watkinsj18@cardiff.ac.uk> Date: Thu, 9 Dec 2021 16:33:09 +0000 Subject: [PATCH] return data now includes bool to determine if there is another page for this query --- .../clientproject/web/restControllers/ShopSearch.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/example/clientproject/web/restControllers/ShopSearch.java b/src/main/java/com/example/clientproject/web/restControllers/ShopSearch.java index 87fec0d..10e2013 100644 --- a/src/main/java/com/example/clientproject/web/restControllers/ShopSearch.java +++ b/src/main/java/com/example/clientproject/web/restControllers/ShopSearch.java @@ -113,8 +113,12 @@ public class ShopSearch { formattedShops.add(data); } + Map<String,Object> returnMap = new HashMap<>(); + returnMap.put("shops",formattedShops); + returnMap.put("hasNextPage", hasNextPage); + Gson gson = new Gson(); - String json = gson.toJson(formattedShops); + String json = gson.toJson(returnMap); return json; -- GitLab