Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Commit

Permalink
GUACAMOLE-38: REST service should return proper JSON.
Browse files Browse the repository at this point in the history
  • Loading branch information
necouchman committed Jun 1, 2018
1 parent 7302013 commit b283adc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Expand Up @@ -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;
Expand Down Expand Up @@ -68,10 +70,11 @@ public QuickConnectREST(QuickConnectDirectory directory) {
*/
@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)));

}

Expand Down
Expand Up @@ -60,7 +60,7 @@ angular.module('guacQuickConnect').factory('quickConnectService', ['$injector',
cacheService.users.removeAll();

// Pass on the connection identifier
return connectionId;
return connectionId.identifier;
});

};
Expand Down

0 comments on commit b283adc

Please sign in to comment.