update So 31. Mai 18:31:01 CEST 2020
This commit is contained in:
parent
22ca5f47b3
commit
fb2035aac4
@ -22,12 +22,12 @@ module.exports = function (io, sql, app_cfg, waip) {
|
|||||||
// in Liste der Clients mit aufnehmen
|
// in Liste der Clients mit aufnehmen
|
||||||
sql.db_client_update_status(socket, 'api');
|
sql.db_client_update_status(socket, 'api');
|
||||||
// Neuen Einsatz speichern
|
// Neuen Einsatz speichern
|
||||||
socket.on('new_waip', function (data) {
|
socket.on('api_new_waip', function (data) {
|
||||||
waip.einsatz_speichern(data);
|
waip.einsatz_speichern(data);
|
||||||
sql.db_log('API', 'Neuer Einsatz von ' + remote_ip + ': ' + data);
|
sql.db_log('API', 'Neuer Einsatz von ' + remote_ip + ': ' + data);
|
||||||
});
|
});
|
||||||
// neue externe Rueckmeldung speichern
|
// neue externe Rueckmeldung speichern
|
||||||
socket.on('new_rmld', function (data) {
|
socket.on('api_new_rmld', function (data) {
|
||||||
sql.db_rmld_save(data, function (result) {
|
sql.db_rmld_save(data, function (result) {
|
||||||
if (result) {
|
if (result) {
|
||||||
waip.rmld_verteilen_by_uuid(data.waip_uuid, data.rmld_uuid);
|
waip.rmld_verteilen_by_uuid(data.waip_uuid, data.rmld_uuid);
|
||||||
@ -71,12 +71,17 @@ module.exports = function (io, sql, app_cfg, waip) {
|
|||||||
sql.db_log('API', 'Verbindung zu ' + app_cfg.endpoint.host + ' verloren, Fehler: ' + reason);
|
sql.db_log('API', 'Verbindung zu ' + app_cfg.endpoint.host + ' verloren, Fehler: ' + reason);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// neuer Einsatz vom Endpoint-Server
|
||||||
|
remote_api.on('res_new_waip', function (data) {
|
||||||
|
sql.db_log('API', 'Verbindung zu ' + app_cfg.endpoint.host + ' verloren, Fehler: ' + reason);
|
||||||
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function send_new_waip(data) {
|
function send_new_waip(data) {
|
||||||
// Alarm an Remote-Server senden, falls funktion aktiviert
|
// Alarm an Remote-Server senden, falls funktion aktiviert
|
||||||
if (app_cfg.endpoint.enabled) {
|
if (app_cfg.endpoint.enabled) {
|
||||||
remote_api.emit('new_waip', data);
|
remote_api.emit('emit_new_waip', data);
|
||||||
sql.db_log('API', 'Neuen Wachalarm an ' + app_cfg.endpoint.host + ' gesendet: ' + data);
|
sql.db_log('API', 'Neuen Wachalarm an ' + app_cfg.endpoint.host + ' gesendet: ' + data);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -84,7 +89,7 @@ module.exports = function (io, sql, app_cfg, waip) {
|
|||||||
function send_new_rmld(data) {
|
function send_new_rmld(data) {
|
||||||
// Rückmeldung an Remote-Server senden, falls funktion aktiviert
|
// Rückmeldung an Remote-Server senden, falls funktion aktiviert
|
||||||
if (app_cfg.endpoint.enabled) {
|
if (app_cfg.endpoint.enabled) {
|
||||||
remote_api.emit('new_rmld', data);
|
remote_api.emit('emit_new_rmld', data);
|
||||||
sql.db_log('API', 'Rückmeldung an ' + app_cfg.endpoint.host + ' gesendet: ' + data);
|
sql.db_log('API', 'Rückmeldung an ' + app_cfg.endpoint.host + ' gesendet: ' + data);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user