changed direct backend access
This commit is contained in:
@@ -5,9 +5,13 @@
|
||||
|
||||
|
||||
const char* BACKEND_SERVER = "http://db.reptilfpv.de:3000";
|
||||
const char* BACKEND_TOKEN = "a4514dc0-15f5-4299-8826-fffb3139d39c";
|
||||
String BACKEND_TOKEN = licence; // Use the licence as the token for authentication
|
||||
|
||||
|
||||
bool backendOnline() {
|
||||
|
||||
Serial.println(licence);
|
||||
|
||||
if (WiFi.status() != WL_CONNECTED) {
|
||||
Serial.println("No WiFi connection.");
|
||||
return false;
|
||||
|
||||
@@ -287,6 +287,7 @@ void setup() {
|
||||
loadBestTimes();
|
||||
loadSettings();
|
||||
loadWifiSettings();
|
||||
loadLocationSettings();
|
||||
|
||||
setupWifi(); // WiFi initialisieren
|
||||
setupOTA(&server);
|
||||
|
||||
@@ -240,6 +240,7 @@ server.on("/api/set-location", HTTP_POST, [](AsyncWebServerRequest *request) {
|
||||
|
||||
server.on("/api/get-location", HTTP_GET, [](AsyncWebServerRequest *request){
|
||||
DynamicJsonDocument doc(128);
|
||||
loadLocationSettings();
|
||||
doc["locationid"] = masterlocation ? masterlocation : "";
|
||||
String result;
|
||||
serializeJson(doc, result);
|
||||
|
||||
Reference in New Issue
Block a user