diff options
author | gumi <git@gumi.ca> | 2019-05-25 23:35:45 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2019-05-25 23:35:45 -0400 |
commit | 4f40140c90246adae4d218006f20f3bcca1fd951 (patch) | |
tree | e3f3b92db457d85e7234e229eca3df97c1148607 | |
parent | fb046276622309038be3357bc93ed8f1a8568102 (diff) | |
download | apiv1-4f40140c90246adae4d218006f20f3bcca1fd951.tar.gz apiv1-4f40140c90246adae4d218006f20f3bcca1fd951.tar.bz2 apiv1-4f40140c90246adae4d218006f20f3bcca1fd951.tar.xz apiv1-4f40140c90246adae4d218006f20f3bcca1fd951.zip |
unfortunately we're using an older node binary on dezilaromed
-rw-r--r-- | package.json | 1 | ||||
-rw-r--r-- | src/api.js | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/package.json b/package.json index c7a56b0..1e7ff74 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ }, "dependencies": { "express": "^4.17.0", + "node-fetch": "^2.6.0", "nodemailer": "^6.2.1", "random-number-csprng": "^1.0.2", "ripgrep-bin": "^11.0.1", @@ -1,4 +1,5 @@ const express = require("express"); // from npm registry +const Fetch = require("node-fetch"); // from npm registry const https = require("https"); // built-in const api = express(); @@ -8,7 +9,7 @@ if (process.env.npm_package_config_port === undefined) { } const send_hook = (msg) => { - const req = new Request(process.env.npm_package_config_logger_webhook, { + Fetch(process.env.npm_package_config_logger_webhook, { method: "POST", cache: "no-cache", redirect: "follow", @@ -21,7 +22,6 @@ const send_hook = (msg) => { }), }); - fetch(req); console.log(msg); }; |