viewer/vueapp/src/components/users/UserService.js
/**
   * Saves a state
   * @param {object} state      The object to save as the state
   * @param {string} stateName  The name of the state to save
   * @returns {Promise} Promise A promise object that signals the completion
   *                            or rejection of the request.
   */
Saves a state
@param {object} state      The object to save as the state
@param {string} stateName  The name of the state to save
@returns {Promise} Promise A promise object that signals the completion
or rejection of the request.
Saves a state @param { object } state The object to save as the state @param { string } stateName The name of the state to save @returns { Promise } Promise A promise object that signals the completion or rejection of the request .
saveState (state, stateName) {
    return new Promise((resolve, reject) => {
      const options = {
        url: `api/user/state/${stateName}`,
        method: 'POST',
        data: state
      };
      Vue.axios(options)
        .then((response) => {
          resolve(response);
        }, (error) => {
          reject(error);
        });
    });
  }
saveState ( state , stateName ) { return new Promise ( ( resolve , reject ) => { const options = { url : ` ${ stateName } ` , method : 'POST' , data : state } ; Vue . axios ( options ) . then ( ( response ) => { resolve ( response ) ; } , ( error ) => { reject ( error ) ; } ) ; } ) ; }
Saves a state
 @param {object} state      The object to save as the state
 @param {string} stateName  The name of the state to save
 @returns {Promise} Promise A promise object that signals the completion
                            or rejection of the request.
Saves a state @param { object } state The object to save as the state @param { string } stateName The name of the state to save @returns { Promise } Promise A promise object that signals the completion or rejection of the request .