cont3xt/linkGroup.js
/**
   * PUT - /api/linkGroup
   *
   * Creates a new link group
   * @name /linkGroup
   * @param {LinkGroup} linkGroup - The link group to create
   * @returns {boolean} success - True if the request was successful, false otherwise
   * @returns {string} text - The success/error message to (optionally) display to the user
   */
/api/linkGroup
Creates a new link group
@name /linkGroup
@param {LinkGroup} linkGroup - The link group to create
@returns {boolean} success - True if the request was successful, false otherwise
@returns {string} text - The success/error message to (optionally) display to the user
/ api / linkGroup Creates a new link group @name / linkGroup @param { LinkGroup } linkGroup - The link group to create @returns { boolean } success - True if the request was successful false otherwise @returns { string } text - The success / error message to ( optionally ) display to the user
static async apiCreate (req, res, next) {
    const linkGroup = req.body;
    linkGroup.creator = req.user.userId;
    const msg = LinkGroup.verifyLinkGroup(linkGroup);
    if (msg) {
      return res.send({ success: false, text: msg });
    }
    const results = await Db.putLinkGroup(null, linkGroup);
    if (!results) {
      return res.send({ success: false, text: 'ES Error' });
    }
    return res.send({ success: true, text: 'Success' });
  }
static async apiCreate ( req , res , next ) { const linkGroup = req . body ; linkGroup . creator = req . user . userId ; const msg = LinkGroup . verifyLinkGroup ( linkGroup ) ; if ( msg ) { return res . send ( { success : false , text : msg } ) ; } const results = await Db . putLinkGroup ( null , linkGroup ) ; if ( ! results ) { return res . send ( { success : false , text : 'ES Error' } ) ; } return res . send ( { success : true , text : 'Success' } ) ; }
PUT - /api/linkGroup
 Creates a new link group
 @name /linkGroup
 @param {LinkGroup} linkGroup - The link group to create
 @returns {boolean} success - True if the request was successful, false otherwise
 @returns {string} text - The success/error message to (optionally) display to the user
PUT - / api / linkGroup Creates a new link group @name / linkGroup @param { LinkGroup } linkGroup - The link group to create @returns { boolean } success - True if the request was successful false otherwise @returns { string } text - The success / error message to ( optionally ) display to the user