static async updateShortcut (req, res) {
    // make sure all the necessary data is included in the post body
    if (!ArkimeUtil.isString(req.body.name)) {
      return res.serverError(403, 'Missing shortcut name');
    }
    if (!ArkimeUtil.isString(req.body.type)) {
      return res.serverError(403, 'Missing shortcut type');
    }
    if (!ArkimeUtil.isString(req.body.value)) {
      return res.serverError(403, 'Missing shortcut value');
    }

    if (req.body.roles !== undefined && !ArkimeUtil.isStringArray(req.body.roles)) {
      return res.serverError(403, 'Roles field must be an array of strings');
    }

    if (req.body.editRoles !== undefined && !ArkimeUtil.isStringArray(req.body.editRoles)) {
      return res.serverError(403, 'Edit roles field must be an array of strings');
    }

    if (req.body.users !== undefined && !ArkimeUtil.isString(req.body.users, 0)) {
      return res.serverError(403, 'Users field must be a string');
    }

    const sentShortcut = req.body;

    try {
      const { body: fetchedShortcut } = await Db.getShortcut(req.params.id);

      if (fetchedShortcut._source.locked) {
        return res.serverError(403, 'Locked Shortcut. Use db.pl script to update this shortcut.');
      }

      const query = {
        query: {
          bool: {
            filter: [
              { term: { name: req.body.name } } // same name
            ],
            must_not: [
              { ids: { values: [req.params.id] } } // but different ID
            ]
          }
        }
      };

      ShortcutAPIs.#shortcutMutex.lock().then(async () => {
        try {
          const { body: { hits: shortcuts } } = await Db.searchShortcuts(query);

          // search for shortcut name collision
          for (const hit of shortcuts.hits) {
            const shortcut = hit._source;
            if (shortcut.name === req.body.name) {
              ShortcutAPIs.#shortcutMutex.unlock();
              return res.serverError(403, `A shortcut with the name, ${req.body.name}, already exists`);
            }
          }

          const { values, invalidUsers } = await ShortcutAPIs.#normalizeShortcut(sentShortcut);

          // sets the owner if it has changed
          if (!await User.setOwner(req, res, sentShortcut, fetchedShortcut._source, 'userId')) {
            ShortcutAPIs.#shortcutMutex.unlock();
            return;
          }

          try {
            await Db.setShortcut(req.params.id, sentShortcut);
            ShortcutAPIs.#shortcutMutex.unlock();
            sentShortcut.value = values.join('\n');
            sentShortcut.users = sentShortcut.users.join(',');

            return res.send(JSON.stringify({
              invalidUsers,
              success: true,
              shortcut: sentShortcut,
              text: 'Updated shortcut!'
            }));
          } catch (err) {
            ShortcutAPIs.#shortcutMutex.unlock();
            console.log(`ERROR - ${req.method} /api/shortcut/%s (setShortcut)`, ArkimeUtil.sanitizeStr(req.params.id), util.inspect(err, false, 50));
            return res.serverError(500, 'Error updating shortcut');
          }
        } catch (err) {
          ShortcutAPIs.#shortcutMutex.unlock();
          console.log(`ERROR - ${req.method} /api/shortcut/%s (searchShortcuts)`, ArkimeUtil.sanitizeStr(req.params.id), util.inspect(err, false, 50));
          return res.serverError(500, 'Error updating shortcut');
        }
      });
    } catch (err) {
      console.log(`ERROR - ${req.method} /api/shortcut/%s (getShortcut)`, ArkimeUtil.sanitizeStr(req.params.id), util.inspect(err, false, 50));
      return res.serverError(500, 'Fetching shortcut to update failed');
    }
  }
PUT - /api/shortcut/:id

Updates a shortcut.
@name /shortcut/:id
@param {string} name - The name of the shortcut.
@param {string} type - The type of the shortcut (number, ip, or string).
@param {string} value - The shortcut value.
@param {string} description - The optional description of this shortcut.
@param {string} users - A comma separated list of users that can view this shortcut.
@param {Array} roles - The roles that can view this shortcut.
@param {Array} editRoles - The roles that can edit this shortcut.
@returns {Shortcut} shortcut - The updated shortcut object.
@returns {boolean} success - Whether the update operation was successful.
@returns {string} text - The success/error message to (optionally) display to the user.