diff --git a/src/main/java/cactusServer/resources/AccountsRest.java b/src/main/java/cactusServer/resources/AccountsRest.java index a94dc42..2cbe28d 100644 --- a/src/main/java/cactusServer/resources/AccountsRest.java +++ b/src/main/java/cactusServer/resources/AccountsRest.java @@ -1,5 +1,7 @@ package cactusServer.resources; +import java.net.URI; + import javax.ws.rs.*; import javax.ws.rs.core.MediaType; @@ -12,7 +14,11 @@ @Path("/login") @Produces(MediaType.APPLICATION_JSON) public String loginAccount(@QueryParam("userID") String userID, @QueryParam("userPass") String userPass) { - return ""; + if(Accounts.getInstance().getAccount(userID).getPass().equals(userPass)) { + return getAccount(userID); + }else { + return "failed login attempt"; + } } @POST