Move checkFetchStatus into NodelHelper

This commit is contained in:
rejas
2021-04-24 09:14:08 +02:00
committed by veeck
parent 90aa50bb11
commit b212641069
5 changed files with 13 additions and 17 deletions

View File

@@ -5,8 +5,8 @@
* MIT Licensed.
*/
const Log = require("logger");
const FetcherHelper = require("fetcher_helper");
const FeedMe = require("feedme");
const NodeHelper = require("node_helper");
const fetch = require("node-fetch");
const iconv = require("iconv-lite");
@@ -85,7 +85,7 @@ const NewsfeedFetcher = function (url, reloadInterval, encoding, logFeedWarnings
};
fetch(url, { headers: headers })
.then(FetcherHelper.checkStatus)
.then(NodeHelper.checkFetchStatus)
.then((response) => {
response.body.pipe(iconv.decodeStream(encoding)).pipe(parser);
})