From 22b84c356514dd7144121ed81711f97085eb79c8 Mon Sep 17 00:00:00 2001 From: Bruno Date: Fri, 17 Jun 2022 20:08:24 +0200 Subject: [PATCH] made endpoints better --- .../main/whattocook/Controller/SpoonacularController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/main/whattocook/Controller/SpoonacularController.java b/backend/src/main/whattocook/Controller/SpoonacularController.java index e91c4fb..bfbf3f7 100644 --- a/backend/src/main/whattocook/Controller/SpoonacularController.java +++ b/backend/src/main/whattocook/Controller/SpoonacularController.java @@ -27,18 +27,18 @@ public class SpoonacularController { @Autowired private SpoonacularApiService service; - @GetMapping("forFridge") + @GetMapping("/forFridge") public HttpEntity getForFridge() throws IOException, InterruptedException, JSONException { return new HttpEntity(service.getForIngridients(itemRepository.findAll(), nextRecepies)); } - @GetMapping("random") + @GetMapping("/random") public HttpEntity getRandom() throws IOException, InterruptedException, JSONException { return new HttpEntity(service.getRandom(new LinkedList<>(), nextRecepies)); //when user has food preferences apply instead of linked list. } - @GetMapping("oneFridge") + @GetMapping("/oneFridge") public HttpEntity getOneFridge() throws IOException, InterruptedException, JSONException { return new HttpEntity(service.getOneForIngridients(itemRepository.findAll(), nextRecepiesForOneRandom)); }