fix bug
This commit is contained in:
parent
aecfe55df8
commit
39de6890b2
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/nbproject/private/
|
|
@ -2,8 +2,13 @@
|
|||
const util = require('util');
|
||||
const fs = require('fs');
|
||||
exports.ReadAPIConfig = async function (req, res) {
|
||||
var text = fs.readFileSync('/root/monitor/setup/apiConfig.txt','utf8');
|
||||
res.send(text);
|
||||
var path = '/root/monitor/setup/apiConfig.txt';
|
||||
if (fs.existsSync(path)) {
|
||||
var text = fs.readFileSync(path,'utf8');
|
||||
res.send({status:true,data:text});
|
||||
} else {
|
||||
res.send({status:false});
|
||||
}
|
||||
};
|
||||
|
||||
exports.SaveAPIConfig = async function (req, res) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user