File tree Expand file tree Collapse file tree
src/main/java/eu/openanalytics/containerproxy/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 */
2121package eu .openanalytics .containerproxy .api ;
2222
23+ import java .util .HashMap ;
2324import java .util .List ;
25+ import java .util .Map ;
2426import java .util .Set ;
2527
2628import javax .inject .Inject ;
@@ -88,11 +90,14 @@ public ResponseEntity<Proxy> startProxy(@RequestBody ProxySpec proxySpec) {
8890 }
8991
9092 @ RequestMapping (value ="/api/proxy/{proxyId}" , method =RequestMethod .DELETE , produces =MediaType .APPLICATION_JSON_VALUE )
91- public ResponseEntity <String > stopProxy (@ PathVariable String proxyId ) {
93+ public ResponseEntity <Map < String , String > > stopProxy (@ PathVariable String proxyId ) {
9294 Proxy proxy = proxyService .findProxy (p -> p .getId ().equals (proxyId ), false );
9395 if (proxy == null ) return new ResponseEntity <>(HttpStatus .NOT_FOUND );
9496
9597 proxyService .stopProxy (proxy , true , false );
96- return new ResponseEntity <>("Proxy stopped" , HttpStatus .OK );
98+ return ResponseEntity .ok (new HashMap <String , String >() {{
99+ put ("status" , "success" );
100+ put ("message" , "proxy_stopped" );
101+ }});
97102 }
98103}
You can’t perform that action at this time.
0 commit comments