updateLinkGroup (linkGroup) {
    store.commit('SET_LINK_GROUPS_ERROR', '');

    for (const link of linkGroup.links) {
      delete link.expanded; // clear link expanded prop, it's just for the UI
    }

    return new Promise((resolve, reject) => {
      fetch(`api/linkGroup/${linkGroup._id}`, {
        method: 'PUT',
        headers: setReqHeaders({ 'Content-Type': 'application/json' }),
        body: JSON.stringify(linkGroup)
      }).then((response) => {
        return response.json();
      }).then((response) => {
        if (response.success) {
          store.commit('UPDATE_LINK_GROUP', linkGroup);
          return resolve(response);
        } else {
          store.commit('SET_LINK_GROUPS_ERROR', response.text);
          return reject(response.text);
        }
      });
    });
  }
Updates a link group.
@param {Object} linkGroup - The new link group data
@returns {Promise} - The promise that either resovles the or rejects in error