mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2026-08-19 13:17:57 +02:00
Differentiate b/w RTL login and LND Unlock
This commit is contained in:
parent
7e408890fc
commit
59f3be564a
6 changed files with 10 additions and 10 deletions
|
|
@ -8,5 +8,5 @@
|
|||
<link rel="stylesheet" href="styles.6acb6bfec10bb1e126bd.css"></head>
|
||||
<body>
|
||||
<rtl-app></rtl-app>
|
||||
<script type="text/javascript" src="runtime.ec2944dd8b20ec099bf3.js"></script><script type="text/javascript" src="polyfills.418928a701f2040ada02.js"></script><script type="text/javascript" src="main.5b06fe887187e8de44b2.js"></script></body>
|
||||
<script type="text/javascript" src="runtime.ec2944dd8b20ec099bf3.js"></script><script type="text/javascript" src="polyfills.418928a701f2040ada02.js"></script><script type="text/javascript" src="main.6638a0b001fe98e8f64b.js"></script></body>
|
||||
</html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
1
angular/main.6638a0b001fe98e8f64b.js
Normal file
1
angular/main.6638a0b001fe98e8f64b.js
Normal file
File diff suppressed because one or more lines are too long
2
app.js
2
app.js
|
|
@ -51,7 +51,7 @@ app.use("/api/newaddress", newAddressRoutes);
|
|||
app.use("/api/transactions", transactionsRoutes);
|
||||
app.use("/api/payreq", payReqRoutes);
|
||||
app.use("/api/payments", paymentsRoutes);
|
||||
app.use("/api/rtlconf", RTLConfRoutes);
|
||||
app.use("/api/conf", RTLConfRoutes);
|
||||
app.use("/api/invoices", invoiceRoutes);
|
||||
|
||||
// sending angular application when route doesn't match
|
||||
|
|
|
|||
|
|
@ -4,18 +4,18 @@ var fs = require('fs');
|
|||
var file_path = path.normalize(__dirname + '/..') + '/RTL.conf';
|
||||
var logger = require('./logger');
|
||||
|
||||
exports.getUISettings = (req, res, next) => {
|
||||
logger.info('\r\nConf: 7: ' + JSON.stringify(Date.now()) + ': INFO: Getting UI Settings');
|
||||
exports.getRTLConfig = (req, res, next) => {
|
||||
logger.info('\r\nConf: 7: ' + JSON.stringify(Date.now()) + ': INFO: Getting RTL Config');
|
||||
fs.readFile(file_path, 'utf8', function(err, data) {
|
||||
if (err) {
|
||||
logger.error('\r\nConf: 10: ' + JSON.stringify(Date.now()) + ': ERROR: Getting UI Settings Failed!');
|
||||
logger.error('\r\nConf: 10: ' + JSON.stringify(Date.now()) + ': ERROR: Getting RTL Config Failed!');
|
||||
res.status(500).json({
|
||||
message: "Reading UI Settings Failed!",
|
||||
message: "Reading RTL Config Failed!",
|
||||
error: err
|
||||
});
|
||||
} else {
|
||||
const jsonConfig = ini.parse(data);
|
||||
res.status(200).json({settings: jsonConfig.Settings});
|
||||
res.status(200).json({settings: jsonConfig.Settings, nodeAuthType: (jsonConfig.Authentication.nodeAuthType) ? jsonConfig.Authentication.nodeAuthType : 'DEFAULT'});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ const express = require("express");
|
|||
const router = express.Router();
|
||||
const authCheck = require("./authCheck");
|
||||
|
||||
router.get("/lndconfig", authCheck, RTLConfController.getLNDConfig);
|
||||
router.get("/uisettings", RTLConfController.getUISettings);
|
||||
router.get("/rtlconf", RTLConfController.getRTLConfig);
|
||||
router.post("/", authCheck, RTLConfController.updateUISettings);
|
||||
router.get("/lndconfig", authCheck, RTLConfController.getLNDConfig);
|
||||
|
||||
module.exports = router;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue