2727 * @author Aaron Detre
2828 */
2929@ RestController
30- @ RequestMapping ("/api/run-info " )
30+ @ RequestMapping ("/api/run" )
3131public class RunInfoAPIController {
32-
32+
3333 @ Autowired
3434 private RunService runService ;
35-
35+
3636 @ Autowired
3737 private UserService userService ;
3838
3939 @ Secured ("ROLE_USER" )
40- @ GetMapping ("/run/ info-by-id" )
41- HashMap <String , Object > getRunInfoById (Authentication auth , @ RequestParam ( "runId" ) Long runId ) {
40+ @ GetMapping ("/info-by-id" )
41+ HashMap <String , Object > getRunInfoById (Authentication auth , @ RequestParam Long runId ) {
4242 try {
4343 User user = userService .retrieveUserByUsername (auth .getName ());
4444 Run run = runService .retrieveById (runId );
@@ -49,7 +49,7 @@ HashMap<String, Object> getRunInfoById(Authentication auth, @RequestParam("runId
4949 }
5050 return createRunNotFoundInfo ();
5151 }
52-
52+
5353 private HashMap <String , Object > getRunInfo (Run run ) {
5454 HashMap <String , Object > info = new HashMap <String , Object >();
5555 info .put ("id" , String .valueOf (run .getId ()));
@@ -79,8 +79,8 @@ private HashMap<String, Object> createRunNotFoundInfo() {
7979 return info ;
8080 }
8181
82- @ GetMapping ("/run/ info" )
83- HashMap <String , Object > getRunInfoByRunCode (@ RequestParam ( "runCode" ) String runCode ) {
82+ @ GetMapping ("/info" )
83+ HashMap <String , Object > getRunInfoByRunCode (@ RequestParam String runCode ) {
8484 try {
8585 return getRunInfo (runService .retrieveRunByRuncode (runCode ));
8686 } catch (ObjectNotFoundException e ) {
@@ -89,4 +89,3 @@ HashMap<String, Object> getRunInfoByRunCode(@RequestParam("runCode") String runC
8989 }
9090
9191}
92-
0 commit comments