mirror of
https://github.com/mblanke/Dashboard.git
synced 2026-03-01 12:10:20 -05:00
Fix: Move os module import to top of file
Co-authored-by: mblanke <9078342+mblanke@users.noreply.github.com>
This commit is contained in:
@@ -5,6 +5,7 @@ const axios = require('axios');
|
|||||||
const { NodeSSH } = require('node-ssh');
|
const { NodeSSH } = require('node-ssh');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const os = require('os');
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
const PORT = process.env.PORT || 3001;
|
const PORT = process.env.PORT || 3001;
|
||||||
@@ -231,8 +232,6 @@ app.get('/api/unifi/devices', async (req, res) => {
|
|||||||
// System info endpoint
|
// System info endpoint
|
||||||
app.get('/api/system/info', async (req, res) => {
|
app.get('/api/system/info', async (req, res) => {
|
||||||
try {
|
try {
|
||||||
const os = require('os');
|
|
||||||
|
|
||||||
res.json({
|
res.json({
|
||||||
success: true,
|
success: true,
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
Reference in New Issue
Block a user