writeUserObject(key, object) {
    let self = this,
      store = this.get("store"),
      user = this.get("session.user");
    if (!user) {
      return;
    }
    if (isBlank(get(user, "id"))) {
      return;
    }

    let setting = store.queryRecord("setting", {
      key: key,
      userId: user.get("id"),
      realmId: null,
    });

    if (setting) {
      setting.then(function(setting) {
        setting.set("object", object);
        self.setRemote(setting);
      });
    } else {
      setting = this.get("store").createRecord("setting", {
        key: key,
        object: object,
        user: user,
      });
      this.setRemote(setting);
    }
  }
/**
   * Writes a key-value-pair on the server where the value is an object
   * @param key
   * @param object
   */
Writes a key-value-pair on the server where the value is an object
@param key
@param object
Writes a key - value - pair on the server where the value is an object @param key @param object
writeUserObject(key, object) {
    let self = this,
      store = this.get("store"),
      user = this.get("session.user");
    if (!user) {
      return;
    }
    if (isBlank(get(user, "id"))) {
      return;
    }
    let setting = store.queryRecord("setting", {
      key: key,
      userId: user.get("id"),
      realmId: null,
    });
    if (setting) {
      setting.then(function(setting) {
        setting.set("object", object);
        self.setRemote(setting);
      });
    } else {
      setting = this.get("store").createRecord("setting", {
        key: key,
        object: object,
        user: user,
      });
      this.setRemote(setting);
    }
  }
writeUserObject ( key , object ) { let self = this , store = this . get ( "store" ) , user = this . get ( "session.user" ) ; if ( ! user ) { return ; } if ( isBlank ( get ( user , "id" ) ) ) { return ; } let setting = store . queryRecord ( "setting" , { key : key , userId : user . get ( "id" ) , realmId : null , } ) ; if ( setting ) { setting . then ( function ( setting ) { setting . set ( "object" , object ) ; self . setRemote ( setting ) ; } ) ; } else { setting = this . get ( "store" ) . createRecord ( "setting" , { key : key , object : object , user : user , } ) ; this . setRemote ( setting ) ; } }
Writes a key-value-pair on the server where the value is an object
 @param key
 @param object
Writes a key - value - pair on the server where the value is an object @param key @param object