{"version":3,"sources":["jsdelivr-header.js","/npm/fortune-healthcheck@0.0.1/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,OAAO,QAAU,SAAU,EAAI,EAAO,EAAK,GACzC,OAAO,SAAU,EAAK,EAAK,GAGzB,GAFA,EAAM,GAAO,kBACb,EAAY,GAAa,6BACrB,EAAI,cAAgB,EACtB,OAAO,IAET,EAAG,KAAK,EAAO,CAAC,GAAG,MACjB,WACE,EAAI,KAAK,IACX,IACA,SAAU,GACR,GAAI,EACF,OAAO,EAAK,GAEd,EAAI,KAAK,IACX,GAEJ,CACF","file":"/npm/fortune-healthcheck@0.0.1/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/fortune-healthcheck@0.0.1/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\n\nmodule.exports = function (db, model, url, failedMsg) {\n  return function (req, res, next) {\n    url = url || '/v1/healthcheck';\n    failedMsg = failedMsg || 'Service Healthcheck Failed';\n    if (req.originalUrl !== url) {\n      return next();\n    }\n    db.find(model, {}).then(\n      function () {\n        res.send(200);\n      },\n      function (err) {\n        if (err) {\n          return next(failedMsg);\n        }\n        res.send(200);\n      }\n    );\n  };\n};\n"]}