mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUACAMOLE-38: REST service should return proper JSON.
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user