cont3xt/vueapp/src/components/services/LinkService.js
/**
   * Deletes a link group.
   * @param {String} id - The id of the link group to delete
   * @param {Number} index - The index of the link group within the array to delete
   * @returns {Promise} - The promise that either resovles the or rejects in error
   */
Deletes a link group.
@param {String} id - The id of the link group to delete
@param {Number} index - The index of the link group within the array to delete
@returns {Promise} - The promise that either resovles the or rejects in error
Deletes a link group . @param { String } id - The id of the link group to delete @param { Number } index - The index of the link group within the array to delete @returns { Promise } - The promise that either resovles the or rejects in error
deleteLinkGroup (id, index) {
    store.commit('SET_LINK_GROUPS_ERROR', '');
    return new Promise((resolve, reject) => {
      fetch(`api/linkGroup/${id}`, {
        method: 'DELETE',
        headers: setReqHeaders()
      }).then((response) => {
        return response.json();
      }).then((response) => {
        if (response.success) {
          store.commit('REMOVE_LINK_GROUP', index);
          return resolve(response);
        } else {
          store.commit('SET_LINK_GROUPS_ERROR', response.text);
          return reject(response.text);
        }
      });
    });
  }
deleteLinkGroup ( id , index ) { store . commit ( 'SET_LINK_GROUPS_ERROR' , '' ) ; return new Promise ( ( resolve , reject ) => { fetch ( ` ${ id } ` , { method : 'DELETE' , headers : setReqHeaders ( ) } ) . then ( ( response ) => { return response . json ( ) ; } ) . then ( ( response ) => { if ( response . success ) { store . commit ( 'REMOVE_LINK_GROUP' , index ) ; return resolve ( response ) ; } else { store . commit ( 'SET_LINK_GROUPS_ERROR' , response . text ) ; return reject ( response . text ) ; } } ) ; } ) ; }
Deletes a link group.
Deletes a link group .