docs: function updateMbaasApp(req, res, next){
    var model = req.appMbaasModel;
  
    model.name = req.params.appname;
    model.domain = req.params.domain;
    model.environment = req.params.environment;
    model.guid = req.body.appGuid;
    model.apiKey = req.body.apiKey;
    model.coreHost = req.body.coreHost;
    model.type = req.body.type;
    model.mbaasUrl = req.body.mbaasUrl;
    //If the serviceApp is not set yet and it is a service app, then make sure it is set.
    model.isServiceApp = typeof model.isServiceApp === "undefined" ? req.body.isServiceApp : model.isServiceApp;
    model.url = req.body.url || model.url;
    model.accessKey = model.accessKey || new mongoose.Types.ObjectId();
  
    model.save(next);
  }