Some update

This commit is contained in:
Sefinek 2025-03-11 00:22:52 +01:00
parent 6511bb6d1f
commit f07b03a66e

View file

@ -1,5 +1,5 @@
const { networkInterfaces } = require('node:os'); const { networkInterfaces } = require('node:os');
const axios = require('./axios.js'); const { get } = require('./axios.js');
const isLocalIP = require('../utils/isLocalIP.js'); const isLocalIP = require('../utils/isLocalIP.js');
const log = require('../utils/log.js'); const log = require('../utils/log.js');
const { CYCLES } = require('../config.js').CONFIG; const { CYCLES } = require('../config.js').CONFIG;
@ -8,7 +8,7 @@ const ipAddrList = new Set();
const fetchIPv4Address = async () => { const fetchIPv4Address = async () => {
try { try {
const { data } = await axios.get('https://api.sefinek.net/api/v2/ip'); const { data } = await get('https://api.sefinek.net/api/v2/ip');
if (data?.success && data?.message) ipAddrList.add(data.message); if (data?.success && data?.message) ipAddrList.add(data.message);
} catch (err) { } catch (err) {
log(2, `Error fetching IPv4 address: ${err.message}`); log(2, `Error fetching IPv4 address: ${err.message}`);