Skip to content
Snippets Groups Projects
Commit e67de261 authored by Martin Dorange's avatar Martin Dorange
Browse files

test addfromform still not working

parent a878c03f
Branches
No related tags found
No related merge requests found
Pipeline #8315 failed
...@@ -57,7 +57,7 @@ public class TodoRessource { ...@@ -57,7 +57,7 @@ public class TodoRessource {
@GET @GET
@Path("{id}/description") @Path("{id}/description")
public String getDescription(@PathParam("id") UUID id) { public String getDescription(@PathParam("id") UUID id) {
LOGGER.info("getdescription()"); LOGGER.info("getDescription()");
return todoService.getTache(id).getDescription(); return todoService.getTache(id).getDescription();
} }
...@@ -87,10 +87,22 @@ public class TodoRessource { ...@@ -87,10 +87,22 @@ public class TodoRessource {
LOGGER.info("createTacheFromForm()"); LOGGER.info("createTacheFromForm()");
Tache tache = new Tache(); Tache tache = new Tache();
// tache.setNom(formParams.); String name= formParams.get("nom").get(0);
System.out.println(name);
tache.setNom(name);
todoService.addTache(tache);
URI location= uri.getAbsolutePathBuilder().path(tache.getId().toString()).build();
EntityTag etag =new EntityTag(Integer.toString(tache.hashCode()));
ResponseBuilder builder = request.evaluatePreconditions(etag);
return null; if (builder == null) {
builder = Response.created(location);
builder.tag(etag);
builder.entity(tache);
}
return builder.build();
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment