How to use the aom.siren function in aom

To help you get started, we’ve selected a few aom examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github betagouv / preuve-covoiturage / api / src / proofs / proof-controller.js View on Github external
router.get('/download', async (req, res, next) => {
  try {
    const query = {};

    if (_.has(req, 'aom.siren')) {
      query['aom.siren'] = req.aom.siren;
    }

    if (_.has(req, 'operator.siren')) {
      query['operator.siren'] = req.operator.siren;
    }

    res
      .set('Content-type', 'text/csv')
      .send(await proofService.convert(await Proof.find(query), 'csv'));
  } catch (e) {
    next(e);
  }
});

aom

API Over Models: typescript-decorators meta-framework

MIT
Latest version published 17 days ago

Package Health Score

60 / 100
Full package analysis

Popular aom functions