Bugfix for SefinekAPI.js
This commit is contained in:
parent
6d237f2dcf
commit
05fc7cb703
1 changed files with 2 additions and 2 deletions
|
|
@ -1,11 +1,11 @@
|
||||||
const axios = require('./axios.js');
|
const axios = require('./axios.js');
|
||||||
const { readReportedIPs, updateSefinekAPIInCSV } = require('./csv.js');
|
const { readReportedIPs, updateSefinekAPIInCSV } = require('./csv.js');
|
||||||
const log = require('../utils/log.js');
|
const log = require('../utils/log.js');
|
||||||
const fetchServerIP = require('./ipFetcher.js');
|
const { getServerIPs } = require('./ipFetcher.js');
|
||||||
const { SEFINEK_API } = require('../config.js').CONFIG;
|
const { SEFINEK_API } = require('../config.js').CONFIG;
|
||||||
|
|
||||||
module.exports = async () => {
|
module.exports = async () => {
|
||||||
const reportedIPs = (readReportedIPs() || []).filter(x => x.status === 'REPORTED' && x.ip !== fetchServerIP() && !x.sefinekAPI);
|
const reportedIPs = (readReportedIPs() || []).filter(x => x.status === 'REPORTED' && !getServerIPs().includes(x.ip) && !x.sefinekAPI);
|
||||||
if (!reportedIPs.length) return log(0, 'Sefinek API: No data to report');
|
if (!reportedIPs.length) return log(0, 'Sefinek API: No data to report');
|
||||||
|
|
||||||
const seenIPs = new Set();
|
const seenIPs = new Set();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue