Implemented update method
This commit is contained in:
parent
a9677988dc
commit
6e15ea93cf
|
@ -177,7 +177,17 @@ public class DefaultMongoConcessioni implements MongoConcessioni{
|
|||
|
||||
@Override
|
||||
public Concessione update(String id, String jsonUpdate) throws Exception {
|
||||
throw new Exception("To implement");
|
||||
log.info("Updating {} ",id);
|
||||
log.debug("JSON is {} ",jsonUpdate);
|
||||
Call<WebTarget,Concessione> call= endpoint -> {
|
||||
Response resp= endpoint.path(id).
|
||||
request(MediaType.APPLICATION_JSON).put(Entity.entity(jsonUpdate,
|
||||
MediaType.APPLICATION_JSON));
|
||||
return check(resp,Concessione.class);
|
||||
};
|
||||
Concessione toReturn = delegate.make(call);
|
||||
log.debug("Updated {} is {} ",id,toReturn);
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue