diff --git a/src/main/java/cactusServer/resources/AccountsRest.java b/src/main/java/cactusServer/resources/AccountsRest.java index c4abff3..0a9bb18 100644 --- a/src/main/java/cactusServer/resources/AccountsRest.java +++ b/src/main/java/cactusServer/resources/AccountsRest.java @@ -1,5 +1,6 @@ package cactusServer.resources; +import java.io.IOException; import java.util.ArrayList; import javax.servlet.http.HttpServletResponse; @@ -15,19 +16,16 @@ @PUT @Produces(MediaType.APPLICATION_JSON) - public URIAddressedEntity loginAccount(@FormParam("userID") String userID, @FormParam("userPass") String userPass) { + public URIAddressedEntity loginAccount(@FormParam("userID") String userID, @FormParam("userPass") String userPass){ URIAddressedEntity session = Accounts.getInstance().loginAccount(userID, userPass); if(session != null) { return session; } else { - int status = 400; + //response.setStatus(400); return null; } - } - - @POST @Path("/logout") @@ -53,7 +51,7 @@ @DELETE @Path("/{uniqueID}") @Produces(MediaType.APPLICATION_JSON) - public Account deleteAccount(@FormParam("uniqueID") String uniqueID) { + public Account deleteAccount(@PathParam("uniqueID") String uniqueID) { return Accounts.getInstance().deleteAccount(uniqueID); }