2
0
mirror of https://github.com/Ride-The-Lightning/RTL synced 2024-11-19 15:25:29 +00:00
RTL/controllers/lndConfSettings.js

18 lines
474 B
JavaScript
Raw Normal View History

2018-10-01 23:11:28 +00:00
var fs = require('fs');
exports.getLNDSettings = (req, res, next) => {
console.log('Getting LND Conf Settings!');
fs.readFile(req.headers.filepath, function(err, data) {
if (err) {
2018-10-05 23:31:39 +00:00
console.log('Reading Config File Failed!');
2018-10-01 23:11:28 +00:00
res.status(500).json({
2018-10-05 23:31:39 +00:00
message: "Reading Config File Failed!",
2018-10-01 23:11:28 +00:00
error: err
});
} else {
console.log('LND Conf read successfully');
res.status(200).json(data.toString('utf8'));
}
});
};