Skip to content

Commit

Permalink
request get itemId and ownerId
Browse files Browse the repository at this point in the history
  • Loading branch information
snirye committed Apr 18, 2020
1 parent 1bf48d2 commit 326433d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions WebContent/content/ItemDetails.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ if(item.getPicture().equals("1")) {
}
out.print("<img src='" + pictureUrl + "' class='w3-round w3-padding-16' height='150' width='150'>");
out.print("<a href='ReqestItemServlet?id="+item.getItemID()+"'>Request Item</a>");
%>
<a href="ReqestItemServlet">Request Item</a>
1 change: 1 addition & 0 deletions src/controller/ReqestItemServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t
req.setItemID(itemId);
req.setPeriod("week");
req.setResponse("0");
req.setOwnerID(mod.getItemByID(itemId).getOwnerID());
mod.addRequest(req);

request.setAttribute("message", "item requested seccesfully!");
Expand Down

0 comments on commit 326433d

Please sign in to comment.