rebuildSampleStore(req, res, next) {
    const resultObj = { reqStartTime: req.timestamp };
    if (!req.headers.IsAdmin) {
      return u.forbidden(next);
    }

    const enabled = featureToggles
      .isFeatureEnabled(sampleStore.constants.featureName);
    if (!enabled) {
      const err = new apiErrors.InvalidSampleStoreState({
        explanation: 'You cannot rebuild the sample store if the ' +
          'ENABLE_REDIS_SAMPLE_STORE feature is not enabled.',
      });
      return next(err);
    }

    return sampleStoreInit.eradicate()
      .then(() => sampleStoreInit.populate())
      .then(() => {
        resultObj.dbTime = new Date() - resultObj.reqStartTime;
        u.logAPI(req, resultObj, {});
        res.status(httpStatus.NO_CONTENT).json();
      })
      .catch(() => u.forbidden(next));
  }
/**
   * POST /admin/sampleStore/rebuild
   *
   * Rebuild the redis sampleStore from the samples in the database. Admin
   * only.
   *
   * @param {IncomingMessage} req - The request object
   * @param {ServerResponse} res - The response object
   * @param {Function} next - The next middleware function in the stack
   */
POST /admin/sampleStore/rebuild
Rebuild the redis sampleStore from the samples in the database. Admin
only.

@param {IncomingMessage} req - The request object
@param {ServerResponse} res - The response object
@param {Function} next - The next middleware function in the stack
POST / admin / sampleStore / rebuild Rebuild the redis sampleStore from the samples in the database . Admin only . @param { IncomingMessage } req - The request object @param { ServerResponse } res - The response object @param { Function } next - The next middleware function in the stack
rebuildSampleStore(req, res, next) {
    const resultObj = { reqStartTime: req.timestamp };
    if (!req.headers.IsAdmin) {
      return u.forbidden(next);
    }
    const enabled = featureToggles
      .isFeatureEnabled(sampleStore.constants.featureName);
    if (!enabled) {
      const err = new apiErrors.InvalidSampleStoreState({
        explanation: 'You cannot rebuild the sample store if the ' +
          'ENABLE_REDIS_SAMPLE_STORE feature is not enabled.',
      });
      return next(err);
    }
    return sampleStoreInit.eradicate()
      .then(() => sampleStoreInit.populate())
      .then(() => {
        resultObj.dbTime = new Date() - resultObj.reqStartTime;
        u.logAPI(req, resultObj, {});
        res.status(httpStatus.NO_CONTENT).json();
      })
      .catch(() => u.forbidden(next));
  }
rebuildSampleStore ( req , res , next ) { const resultObj = { reqStartTime : req . timestamp } ; if ( ! req . headers . IsAdmin ) { return u . forbidden ( next ) ; } const enabled = featureToggles . isFeatureEnabled ( sampleStore . constants . featureName ) ; if ( ! enabled ) { const err = new apiErrors . InvalidSampleStoreState ( { explanation : 'You cannot rebuild the sample store if the ' + 'ENABLE_REDIS_SAMPLE_STORE feature is not enabled.' , } ) ; return next ( err ) ; } return sampleStoreInit . eradicate ( ) . then ( ( ) => sampleStoreInit . populate ( ) ) . then ( ( ) => { resultObj . dbTime = new Date ( ) - resultObj . reqStartTime ; u . logAPI ( req , resultObj , { } ) ; res . status ( httpStatus . NO_CONTENT ) . json ( ) ; } ) . catch ( ( ) => u . forbidden ( next ) ) ; }
POST /admin/sampleStore/rebuild
 Rebuild the redis sampleStore from the samples in the database.
POST / admin / sampleStore / rebuild Rebuild the redis sampleStore from the samples in the database .