viewer/vueapp/src/components/users/UserService.js
/**
   * Updates a specified view for a user
   * @param {Object} data       The view data to pass to the server
   * @param {string} userId     The unique identifier for a user
   *                            (only required if not the current user)
   * @returns {Promise} Promise A promise object that signals the completion
   *                            or rejection of the request.
   */
Updates a specified view for a user
@param {Object} data       The view data to pass to the server
@param {string} userId     The unique identifier for a user
(only required if not the current user)
@returns {Promise} Promise A promise object that signals the completion
or rejection of the request.
Updates a specified view for a user @param { Object } data The view data to pass to the server @param { string } userId The unique identifier for a user ( only required if not the current user ) @returns { Promise } Promise A promise object that signals the completion or rejection of the request .
updateView (data, userId) {
    return new Promise((resolve, reject) => {
      const options = {
        url: `api/user/view/${data.key}`,
        method: 'PUT',
        data: data,
        params: { userId: userId }
      };
      Vue.axios(options)
        .then((response) => {
          response.data.views = this.parseViews(response.data.views);
          resolve(response.data);
        }, (error) => {
          reject(error);
        });
    });
  }
updateView ( data , userId ) { return new Promise ( ( resolve , reject ) => { const options = { url : ` ${ data . key } ` , method : 'PUT' , data : data , params : { userId : userId } } ; Vue . axios ( options ) . then ( ( response ) => { response . data . views = this . parseViews ( response . data . views ) ; resolve ( response . data ) ; } , ( error ) => { reject ( error ) ; } ) ; } ) ; }
Updates a specified view for a user
 @param {Object} data       The view data to pass to the server
 @param {string} userId     The unique identifier for a user
                            (only required if not the current user)
 @returns {Promise} Promise A promise object that signals the completion
                            or rejection of the request.
Updates a specified view for a user @param { Object } data The view data to pass to the server @param { string } userId The unique identifier for a user ( only required if not the current user ) @returns { Promise } Promise A promise object that signals the completion or rejection of the request .