Some update
This commit is contained in:
parent
6511bb6d1f
commit
f07b03a66e
1 changed files with 2 additions and 2 deletions
|
|
@ -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}`);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue