edit: Stationen auf die Karte bekommen , muss der IP des Server eingegeben werden in [...path]
This commit is contained in:
206
pages/api/talas5/webserviceMap/GisStationsStatusDistrict.js
Normal file
206
pages/api/talas5/webserviceMap/GisStationsStatusDistrict.js
Normal file
@@ -0,0 +1,206 @@
|
||||
// /pages/api/talas5/webserviceMap/GisStationsStatusDistrict.js
|
||||
const GisStationsStatusDistrict = {
|
||||
"Name": "Liste aller Statis der Geraete",
|
||||
"Zeitstempel": "2024-05-31T15:28:10.2538122+02:00",
|
||||
"IdMap": "10",
|
||||
"Statis": [
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "system",
|
||||
"Le": 4,
|
||||
"Co": "#FF00FF",
|
||||
"Me": "Eingang DE04 kommend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "system",
|
||||
"Le": 4,
|
||||
"Co": "#FF00FF",
|
||||
"Me": "Eingang DE05 kommend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "system",
|
||||
"Le": 4,
|
||||
"Co": "#FF00FF",
|
||||
"Me": "Eingang DE06 kommend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "system",
|
||||
"Le": 4,
|
||||
"Co": "#FF00FF",
|
||||
"Me": "Eingang DE07 kommend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "system",
|
||||
"Le": 4,
|
||||
"Co": "#FF00FF",
|
||||
"Me": "Eingang DE09 kommend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "system",
|
||||
"Le": 4,
|
||||
"Co": "#FF00FF",
|
||||
"Me": "Eingang DE10 kommend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "system",
|
||||
"Le": 4,
|
||||
"Co": "#FF00FF",
|
||||
"Me": "Eingang DE12 kommend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "system",
|
||||
"Le": 4,
|
||||
"Co": "#FF00FF",
|
||||
"Me": "Eingang DE13 kommend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "system",
|
||||
"Le": 4,
|
||||
"Co": "#FF00FF",
|
||||
"Me": "Eingang DE14 kommend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "system",
|
||||
"Le": 4,
|
||||
"Co": "#FF00FF",
|
||||
"Me": "Eingang DE15 kommend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "system",
|
||||
"Le": 4,
|
||||
"Co": "#FF00FF",
|
||||
"Me": "Eingang DE16 kommend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "system",
|
||||
"Le": 4,
|
||||
"Co": "#FF00FF",
|
||||
"Me": "Eingang DE17 kommend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "minor",
|
||||
"Le": 3,
|
||||
"Co": "#FFFF00",
|
||||
"Me": "Eingang DE01 gehend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "minor",
|
||||
"Le": 3,
|
||||
"Co": "#FFFF00",
|
||||
"Me": "KÜG 07: Übersapnnung kommend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50004,
|
||||
"Na": "major",
|
||||
"Le": 2,
|
||||
"Co": "#FF9900",
|
||||
"Me": "Fahrbahntemperatur okay",
|
||||
"Feld": 53,
|
||||
"Icon": 25
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "critical",
|
||||
"Le": 1,
|
||||
"Co": "#FF0000",
|
||||
"Me": "KÜG 01: Isolationsminderung kommend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "critical",
|
||||
"Le": 1,
|
||||
"Co": "#FF0000",
|
||||
"Me": "KÜG 02: Isolationsminderung kommend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "critical",
|
||||
"Le": 1,
|
||||
"Co": "#FF0000",
|
||||
"Me": "KÜG 03: Isolationsminderung kommend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "critical",
|
||||
"Le": 1,
|
||||
"Co": "#FF0000",
|
||||
"Me": "KÜG 04: Isolationsminderung kommend",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
},
|
||||
{
|
||||
"IdLD": 50017,
|
||||
"Na": "critical",
|
||||
"Le": 1,
|
||||
"Co": "#FF0000",
|
||||
"Me": "Ping True",
|
||||
"Feld": 3,
|
||||
"Icon": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// Export an async function handler for the API route.
|
||||
export default async function handler(req, res) {
|
||||
// Initialize an empty params object to store query parameters.
|
||||
const params = {
|
||||
idMap: req.query.idMap,
|
||||
idUser: req.query.idUser
|
||||
};
|
||||
|
||||
// Check if the requested ID map and user match certain conditions.
|
||||
if (params.idMap === '10' && params.idUser === '484') {
|
||||
// If the conditions are met, return the GisStationsStatusDistrict object with a 200 status code.
|
||||
res.status(200).json(GisStationsStatusDistrict);
|
||||
} else {
|
||||
// If not, return a 404 error with the message "Not Found".
|
||||
res.status(404).send('Not Found');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user