Skip to content
Snippets Groups Projects
Commit f55a7e8e authored by Martin Staehr's avatar Martin Staehr
Browse files

#63 fixing bugs

parent c78cb117
No related branches found
No related tags found
No related merge requests found
......@@ -73,8 +73,9 @@ public class UserDAO {
connect.connect();
String mysqlRequest = "SELECT * FROM users where rocketChatUsername = ?";
VereinfachtesResultSet resultSet = connect.issueSelectStatement(mysqlRequest, rocketChatUsername);
boolean result = resultSet.next();
connect.close();
return resultSet.next();
return result;
}
public List<User> getUsersByProjectId(String projectId) {
......
package unipotsdam.gf.modules.communication.model.rocketChat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.util.Map;
@JsonIgnoreProperties(ignoreUnknown = true)
public class RocketChatLoginResponse {
private String status;
......
package unipotsdam.gf.modules.communication.model.rocketChat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.logging.log4j.util.Strings;
import java.util.Map;
@JsonIgnoreProperties(ignoreUnknown = true)
public class RocketChatRegisterResponse {
private Map user;
......
......@@ -13,6 +13,7 @@ import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.List;
......@@ -95,8 +96,8 @@ public class CommunicationView {
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Path("/room/create")
public Response createChatRoom(String name, List<User> users, boolean readOnly) {
@Path("/room/create/{name}")
public Response createChatRoom(@PathParam("name") String name, List<User> users, @QueryParam("readOnly") boolean readOnly) {
if (isNull(name)) {
return Response.status(Response.Status.BAD_REQUEST).entity("must provide name as queryParam").build();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment