/////////////////////////////////////////////////////////////////////////////////////////////////
// TODO (INF-1214): Make this code more robust to handle changes to the community that need to
// Caleb: this means change update to $set
/////////////////////////////////////////////////////////////////////////////////////////////////
DbManager.getSocial().getCommunity().update(query, cp.toDb());
DbManager.getSocial().getPerson().update(queryPerson, pp.toDb());
rp.setResponse(new ResponseObject("Leave Community",true,"Left community successfully"));
}
else
{
rp.setResponse(new ResponseObject("Leave Community",false,"Cannot leave personal community"));