mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-08 06:01:22 +00:00
Ticket #362: Cleaned up even morely.
This commit is contained in:
@@ -97,7 +97,7 @@ public class ConnectionRESTService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(parentConnectionGroup == null)
|
if(parentConnectionGroup == null)
|
||||||
throw new HTTPException(Status.NOT_FOUND, "No Connection found with the provided parentID.");
|
throw new HTTPException(Status.NOT_FOUND, "No ConnectionGroup found with the provided parentID.");
|
||||||
|
|
||||||
Directory<String, Connection> connectionDirectory =
|
Directory<String, Connection> connectionDirectory =
|
||||||
parentConnectionGroup.getConnectionDirectory();
|
parentConnectionGroup.getConnectionDirectory();
|
||||||
@@ -145,7 +145,7 @@ public class ConnectionRESTService {
|
|||||||
Connection connection = connectionDirectory.get(connectionID);
|
Connection connection = connectionDirectory.get(connectionID);
|
||||||
|
|
||||||
if(connection == null)
|
if(connection == null)
|
||||||
throw new HTTPException(Status.NOT_FOUND, "No Connection found with the provided parentID.");
|
throw new HTTPException(Status.NOT_FOUND, "No Connection found with the provided ID.");
|
||||||
|
|
||||||
return new APIConnection(connection);
|
return new APIConnection(connection);
|
||||||
} catch(GuacamoleSecurityException e) {
|
} catch(GuacamoleSecurityException e) {
|
||||||
@@ -225,7 +225,7 @@ public class ConnectionRESTService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(parentConnectionGroup == null)
|
if(parentConnectionGroup == null)
|
||||||
throw new HTTPException(Status.NOT_FOUND, "No Connection found with the provided parentID.");
|
throw new HTTPException(Status.NOT_FOUND, "No ConnectionGroup found with the provided parentID.");
|
||||||
|
|
||||||
Directory<String, Connection> connectionDirectory =
|
Directory<String, Connection> connectionDirectory =
|
||||||
parentConnectionGroup.getConnectionDirectory();
|
parentConnectionGroup.getConnectionDirectory();
|
||||||
@@ -310,7 +310,7 @@ public class ConnectionRESTService {
|
|||||||
ConnectionGroup parentConnectionGroup = connectionGroupDirectory.get(parentID);
|
ConnectionGroup parentConnectionGroup = connectionGroupDirectory.get(parentID);
|
||||||
|
|
||||||
if(parentConnectionGroup == null)
|
if(parentConnectionGroup == null)
|
||||||
throw new HTTPException(Status.NOT_FOUND, "No Connection found with the provided parentID.");
|
throw new HTTPException(Status.NOT_FOUND, "No ConnectionGroup found with the provided parentID.");
|
||||||
|
|
||||||
// Move the connection
|
// Move the connection
|
||||||
connectionDirectory.move(connectionID, parentConnectionGroup.getConnectionDirectory());
|
connectionDirectory.move(connectionID, parentConnectionGroup.getConnectionDirectory());
|
||||||
|
Reference in New Issue
Block a user