by beamso · 14y ago · 0 comments
@DELETE
@Path("{uid: [0-9]+}")
public Response deleteStudent(@PathParam("uid") int uid) {
final Student deletedStudent = STUDENTS.remove(uid);
if (deletedStudent == null) {
return Response.status(Response.Status.NOT_FOUND).build();
} else {
return Response.ok().entity(true).build();
}
}The full (buildable) source code - including the CsvParam and DateParam classes - are here: https://github.com/smanek/students