Skip to content
Snippets Groups Projects
Commit 1f6ed966 authored by Felix Sidokhine's avatar Felix Sidokhine
Browse files

added put, delete and get for contacts

parent 460d8df9
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,8 @@ public class ContactServlet extends HttpServlet {
protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
StatementList statementList = new StatementList();
statementList.addStatement(new StatementElement("owner","=",req.getAttribute("username").toString(),"AND"));
//if(dataStore.getContactDao().deleteObject()) resp.setStatus(200);
//else resp.sendError(500,"Could not delete a contact!");
statementList.addStatement(new StatementElement("uri","=",req.getParameter("uri"),""));
if(dataStore.getContactDao().deleteObject()) resp.setStatus(200);
else resp.sendError(500,"Could not delete a contact!");
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment