formated code
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Has been cancelled
This commit is contained in:
1 parent
d1a08ba5ce
commit
f4bcead439
46 files changed
+23674
-22776
No files matched your search
@@ -13,7 +13,7 @@ namespace api
|
||||
{
|
||||
namespace dns
|
||||
{
|
||||
void get_dns_servers(const httplib::Request &request, httplib::Response &response)
|
||||
void get_dns_servers(const httplib::Request& request, httplib::Response& response)
|
||||
{
|
||||
std::cout << GREEN << request.path << RESET << " " << request.method << std::endl;
|
||||
response.set_header("Access-Control-Allow-Origin", "*");
|
||||
@@ -36,7 +36,7 @@ namespace api
|
||||
response.set_content(responsedata.str(), JSON_TYPE);
|
||||
}
|
||||
|
||||
void set_dns_servers(const httplib::Request &request, httplib::Response &response)
|
||||
void set_dns_servers(const httplib::Request& request, httplib::Response& response)
|
||||
{
|
||||
std::cout << GREEN << request.path << RESET << " " << request.method << std::endl;
|
||||
response.set_header("Access-Control-Allow-Origin", "*");
|
||||
@@ -54,7 +54,7 @@ namespace api
|
||||
}
|
||||
std::ofstream dnsserversfile("/etc/dnsmasq.conf.d/resolv.conf");
|
||||
nlohmann::json servers = json_body["servers"];
|
||||
for (const nlohmann::json_abi_v3_11_3::json &server : servers)
|
||||
for (const nlohmann::json_abi_v3_11_3::json& server : servers)
|
||||
{
|
||||
std::string srv = server;
|
||||
if (server == "")
|
||||
|
||||
Reference in new issue
Block a user