From b7b2eafb933d9a1cac369dc24f68451459d91591 Mon Sep 17 00:00:00 2001 From: Bartha Maxime <231026@umons.ac.be> Date: Sat, 16 Mar 2024 00:44:11 +0100 Subject: [PATCH] removed the GET /Apps/{id} frontend just iterates on the /apps list --- .../Clyde/EndPoints/ApplicationsController.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController.java index d5ad171..c76d513 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController.java @@ -31,16 +31,7 @@ public class ApplicationsController { return new ResponseEntity<>(getAuthorizedApplications(token), HttpStatus.OK); } - @GetMapping("/apps/{identifier}") - public ResponseEntity getAppAuthorization(@PathVariable Applications identifier, @RequestHeader("Authorization") String token){ - - if (getAuthorizedApplications(token).contains(identifier)){ - return new ResponseEntity<>(true, HttpStatus.OK); - } - return new ResponseEntity<>(false, HttpStatus.OK); - } - - public ArrayList getAuthorizedApplications(String token){ + private ArrayList getAuthorizedApplications(String token){ Role posterRole = authServ.getUserFromToken(token).getRole(); ArrayList authorizedApps = new ArrayList<>();