zero-ui/backend/utils/zt-address.js

14 lines
303 B
JavaScript
Raw Normal View History

2021-03-22 03:25:13 +08:00
const api = require("../utils/controller-api");
module.exports = async function () {
try {
const res = await api.get("status");
return res.data.address;
} catch (err) {
2022-08-26 07:25:16 +08:00
console.error(
// @ts-ignore
2022-08-26 07:25:16 +08:00
"Couldn't connect to the controller on " + err.config.baseURL
);
}
2021-03-22 03:25:13 +08:00
};