diff --git a/src/main/java/cactusServer/resources/AccountsRest.java b/src/main/java/cactusServer/resources/AccountsRest.java index 03b283a..7f503d7 100644 --- a/src/main/java/cactusServer/resources/AccountsRest.java +++ b/src/main/java/cactusServer/resources/AccountsRest.java @@ -13,12 +13,8 @@ @POST @Path("/login") @Produces(MediaType.APPLICATION_JSON) - public URI loginAccount(@QueryParam("userID") String userID, @QueryParam("userPass") String userPass) { - if(Accounts.getInstance().getAccount(userID).getPass().equals(userPass)) { - return URI.create(userID); - }else { - return URI.create("failed login attempt"); - } + public Account loginAccount(@QueryParam("userID") String userID, @QueryParam("userPass") String userPass) { + return Accounts.getInstance().loginAccount(userID, userPass); } @POST