Moved ota username into newsettings
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
#include "buildserver.h"
|
||||
|
||||
#include <ArduinoJson.h>
|
||||
#include <cpputils.h>
|
||||
#include <cleanuphelper.h>
|
||||
// esp-idf
|
||||
#include "esp_http_client.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <asynchttprequest.h>
|
||||
#include <delayedconstruction.h>
|
||||
#include <ArduinoJson.h>
|
||||
#include <cpputils.h>
|
||||
#include <cleanuphelper.h>
|
||||
#include "fmt/core.h"
|
||||
|
||||
// local includes
|
||||
#include "globals.h"
|
||||
#include "esp_log.h"
|
||||
#include "fmt/core.h"
|
||||
|
||||
// esp-idf
|
||||
#include "esp_http_client.h"
|
||||
#include "newsettings.h"
|
||||
|
||||
#ifdef FEATURE_OTA
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace buildserver {
|
||||
return;
|
||||
}
|
||||
|
||||
const auto url = fmt::format("{}/otaDescriptor?username={}&branches", server_base_url, OTA_USERNAME);
|
||||
const auto url = fmt::format("{}/otaDescriptor?username={}&branches", server_base_url, configs.otaUsername.value);
|
||||
ESP_LOGD("BOBBY", "requesting data...");
|
||||
if (const auto result = request->start(url); !result)
|
||||
{
|
||||
@@ -168,9 +168,9 @@ namespace buildserver {
|
||||
std::string get_descriptor_url(std::string base_url)
|
||||
{
|
||||
if (stringSettings.otaServerBranch.empty())
|
||||
return fmt::format("{}/otaDescriptor?username={}", base_url, OTA_USERNAME);
|
||||
return fmt::format("{}/otaDescriptor?username={}", base_url, configs.otaUsername.value);
|
||||
else
|
||||
return fmt::format("{}/otaDescriptor?username={}&branch={}", base_url, OTA_USERNAME, stringSettings.otaServerBranch);
|
||||
return fmt::format("{}/otaDescriptor?username={}&branch={}", base_url, configs.otaUsername.value, stringSettings.otaServerBranch);
|
||||
}
|
||||
|
||||
void parse_response_into_variables(std::string response)
|
||||
|
Reference in New Issue
Block a user