You've already forked fm-dx-webserver
mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-02-26 22:13:53 +01:00
ui changes, playback bugfixes
This commit is contained in:
15
index.js
15
index.js
@@ -121,7 +121,6 @@ function connectToXdrd() {
|
||||
const lines = receivedData.split('\n');
|
||||
|
||||
for (const line of lines) {
|
||||
|
||||
if (!authFlags.receivedPassword) {
|
||||
authFlags.receivedSalt = line.trim();
|
||||
authenticateWithXdrd(client, authFlags.receivedSalt, serverConfig.xdrd.xdrdPassword);
|
||||
@@ -143,7 +142,7 @@ function connectToXdrd() {
|
||||
if (authFlags.authMsg && authFlags.firstClient) {
|
||||
client.write('T87500\n');
|
||||
client.write('A0\n');
|
||||
client.write('G11\n');
|
||||
client.write('G00\n');
|
||||
client.off('data', authDataHandler);
|
||||
return;
|
||||
}
|
||||
@@ -226,6 +225,17 @@ app.get('/static_data', (req, res) => {
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/server_time', (req, res) => {
|
||||
const serverTime = new Date().toISOString();
|
||||
res.json({
|
||||
serverTime
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/ping', (req, res) => {
|
||||
res.send('pong');
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* AUTHENTICATION BLOCK
|
||||
@@ -342,7 +352,6 @@ app.get('/getData', (req, res) => {
|
||||
app.get('/getDevices', (req, res) => {
|
||||
if (req.session.isAdminAuthenticated || !fs.existsSync('config.json')) {
|
||||
parseAudioDevice((result) => {
|
||||
console.log(result);
|
||||
res.json(result);
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user