inject mgo reference to endpoints
resolve merge conflicts