added ApplicationController and Application enum #119
@ -31,16 +31,7 @@ public class ApplicationsController {
 | 
				
			|||||||
        return new ResponseEntity<>(getAuthorizedApplications(token), HttpStatus.OK);
 | 
					        return new ResponseEntity<>(getAuthorizedApplications(token), HttpStatus.OK);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @GetMapping("/apps/{identifier}")
 | 
					    private ArrayList<Applications> getAuthorizedApplications(String token){
 | 
				
			||||||
    public ResponseEntity<Boolean> 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<Applications> getAuthorizedApplications(String token){
 | 
					 | 
				
			||||||
        Role posterRole = authServ.getUserFromToken(token).getRole();
 | 
					        Role posterRole = authServ.getUserFromToken(token).getRole();
 | 
				
			||||||
        ArrayList<Applications> authorizedApps = new ArrayList<>();
 | 
					        ArrayList<Applications> authorizedApps = new ArrayList<>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user