GUACAMOLE-38: REST service should return proper JSON.

This commit is contained in:
Nick Couchman committed 2018-06-01 13:40:53 -04:00
1 parent 730201358e
commit b283adc73a
2 files changed
+6 -3

No files matched your search

@@ -19,6 +19,8 @@
package org.apache.guacamole.auth.quickconnect.rest;
import java.util.Collections;
import java.util.Map;
import javax.ws.rs.FormParam;
import javax.ws.rs.Path;
import javax.ws.rs.POST;
@@ -68,10 +70,11 @@ public class QuickConnectREST {
*/
@POST
@Path("create")
public String create(@FormParam("uri") String uri)
public Map<String, String> create(@FormParam("uri") String uri)
throws GuacamoleException {
return directory.create(QCParser.getConfiguration(uri));
return Collections.singletonMap("identifier",
directory.create(QCParser.getConfiguration(uri)));
}
@@ -60,7 +60,7 @@ angular.module('guacQuickConnect').factory('quickConnectService', ['$injector',
cacheService.users.removeAll();
// Pass on the connection identifier
return connectionId;
return connectionId.identifier;
});
};