mirror of
https://github.com/yawaflua/SpCloudCore.git
synced 2025-12-10 04:29:35 +02:00
Introduce envoronment variables and refresh secrets
This commit is contained in:
@@ -24,7 +24,7 @@ public:
|
|||||||
std::string command = "curl --location https://discord.com/api/oauth2/token "
|
std::string command = "curl --location https://discord.com/api/oauth2/token "
|
||||||
"--header \"Content-Type: application/x-www-form-urlencoded\" "
|
"--header \"Content-Type: application/x-www-form-urlencoded\" "
|
||||||
"--data-urlencode \"client_id=1273414933874479185\" "
|
"--data-urlencode \"client_id=1273414933874479185\" "
|
||||||
"--data-urlencode \"client_secret=S_vG4frjIxWoi8mic_GlcxUO0aWxXwRJ\" "
|
"--data-urlencode \"client_secret=" + std::string(std::getenv("DiscordAppSecret")) + "\" "
|
||||||
"--data-urlencode \"grant_type=authorization_code\" "
|
"--data-urlencode \"grant_type=authorization_code\" "
|
||||||
"--data-urlencode \"code=" + auth_code_processed + "\" "
|
"--data-urlencode \"code=" + auth_code_processed + "\" "
|
||||||
"--data-urlencode \"redirect_uri=https://spcloud.almavid.ru\"";
|
"--data-urlencode \"redirect_uri=https://spcloud.almavid.ru\"";
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public:
|
|||||||
|
|
||||||
std::string command = "curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/findOne' "
|
std::string command = "curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/findOne' "
|
||||||
"--header 'Content-Type: application/json' "
|
"--header 'Content-Type: application/json' "
|
||||||
"--header 'api-key: Q1NfSCrruUAzsxdrjhZd3sjSwiqbdSFmCLeaCatZiuohUXsvEq9RtEAeG0JL2Jd7' "
|
"--header 'api-key: " + std::string(std::getenv("MongoDbApiKey")) + "' "
|
||||||
"--data-raw '" + json_data + "'";
|
"--data-raw '" + json_data + "'";
|
||||||
|
|
||||||
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
||||||
@@ -55,7 +55,7 @@ public:
|
|||||||
"curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/updateOne' "
|
"curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/updateOne' "
|
||||||
"--header 'Content-Type: application/json' "
|
"--header 'Content-Type: application/json' "
|
||||||
"--header 'Access-Control-Request-Headers: *' "
|
"--header 'Access-Control-Request-Headers: *' "
|
||||||
"--header 'api-key: Q1NfSCrruUAzsxdrjhZd3sjSwiqbdSFmCLeaCatZiuohUXsvEq9RtEAeG0JL2Jd7' "
|
"--header 'api-key: " + std::string(std::getenv("MongoDbApiKey")) + "' "
|
||||||
"--data '" + json_data + "'";
|
"--data '" + json_data + "'";
|
||||||
|
|
||||||
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
||||||
@@ -83,7 +83,7 @@ public:
|
|||||||
"curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/updateOne' "
|
"curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/updateOne' "
|
||||||
"--header 'Content-Type: application/json' "
|
"--header 'Content-Type: application/json' "
|
||||||
"--header 'Access-Control-Request-Headers: *' "
|
"--header 'Access-Control-Request-Headers: *' "
|
||||||
"--header 'api-key: Q1NfSCrruUAzsxdrjhZd3sjSwiqbdSFmCLeaCatZiuohUXsvEq9RtEAeG0JL2Jd7' "
|
"--header 'api-key: " + std::string(std::getenv("MongoDbApiKey")) + "' "
|
||||||
"--data '" + json_data + "'";
|
"--data '" + json_data + "'";
|
||||||
|
|
||||||
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
||||||
@@ -107,7 +107,7 @@ public:
|
|||||||
std::string command =
|
std::string command =
|
||||||
"curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/deleteOne' "
|
"curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/deleteOne' "
|
||||||
"--header 'Content-Type: application/json' "
|
"--header 'Content-Type: application/json' "
|
||||||
"--header 'api-key: Q1NfSCrruUAzsxdrjhZd3sjSwiqbdSFmCLeaCatZiuohUXsvEq9RtEAeG0JL2Jd7' "
|
"--header 'api-key: " + std::string(std::getenv("MongoDbApiKey")) + "' "
|
||||||
"--data '" + json_data + "'";
|
"--data '" + json_data + "'";
|
||||||
|
|
||||||
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
||||||
@@ -131,7 +131,7 @@ public:
|
|||||||
std::string command =
|
std::string command =
|
||||||
"curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/findOne' "
|
"curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/findOne' "
|
||||||
"--header 'Content-Type: application/json' "
|
"--header 'Content-Type: application/json' "
|
||||||
"--header 'api-key: Q1NfSCrruUAzsxdrjhZd3sjSwiqbdSFmCLeaCatZiuohUXsvEq9RtEAeG0JL2Jd7' "
|
"--header 'api-key: " + std::string(std::getenv("MongoDbApiKey")) + "' "
|
||||||
"--data-raw '" + json_data + "'";
|
"--data-raw '" + json_data + "'";
|
||||||
|
|
||||||
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
||||||
@@ -178,7 +178,7 @@ public:
|
|||||||
|
|
||||||
std::string command = "curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/findOne' "
|
std::string command = "curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/findOne' "
|
||||||
"--header 'Content-Type: application/json' "
|
"--header 'Content-Type: application/json' "
|
||||||
"--header 'api-key: Q1NfSCrruUAzsxdrjhZd3sjSwiqbdSFmCLeaCatZiuohUXsvEq9RtEAeG0JL2Jd7' "
|
"--header 'api-key: " + std::string(std::getenv("MongoDbApiKey")) + "' "
|
||||||
"--data-raw '" + json_data + "'";
|
"--data-raw '" + json_data + "'";
|
||||||
|
|
||||||
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
||||||
@@ -207,7 +207,7 @@ public:
|
|||||||
|
|
||||||
std::string command = "curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/findOne' "
|
std::string command = "curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/findOne' "
|
||||||
"--header 'Content-Type: application/json' "
|
"--header 'Content-Type: application/json' "
|
||||||
"--header 'api-key: Q1NfSCrruUAzsxdrjhZd3sjSwiqbdSFmCLeaCatZiuohUXsvEq9RtEAeG0JL2Jd7' "
|
"--header 'api-key: " + std::string(std::getenv("MongoDbApiKey")) + "' "
|
||||||
"--data-raw '" + json_data + "'";
|
"--data-raw '" + json_data + "'";
|
||||||
|
|
||||||
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
||||||
@@ -256,7 +256,7 @@ public:
|
|||||||
|
|
||||||
std::string command = "curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/findOne' "
|
std::string command = "curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/findOne' "
|
||||||
"--header 'Content-Type: application/json' "
|
"--header 'Content-Type: application/json' "
|
||||||
"--header 'api-key: Q1NfSCrruUAzsxdrjhZd3sjSwiqbdSFmCLeaCatZiuohUXsvEq9RtEAeG0JL2Jd7' "
|
"--header 'api-key: " + std::string(std::getenv("MongoDbApiKey")) + "' "
|
||||||
"--data-raw '" + json_data + "'";
|
"--data-raw '" + json_data + "'";
|
||||||
|
|
||||||
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
||||||
@@ -288,7 +288,7 @@ public:
|
|||||||
|
|
||||||
std::string command = "curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/findOne' "
|
std::string command = "curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/findOne' "
|
||||||
"--header 'Content-Type: application/json' "
|
"--header 'Content-Type: application/json' "
|
||||||
"--header 'api-key: Q1NfSCrruUAzsxdrjhZd3sjSwiqbdSFmCLeaCatZiuohUXsvEq9RtEAeG0JL2Jd7' "
|
"--header 'api-key: " + std::string(std::getenv("MongoDbApiKey")) + "' "
|
||||||
"--data-raw '" + json_data + "'";
|
"--data-raw '" + json_data + "'";
|
||||||
|
|
||||||
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
||||||
@@ -321,7 +321,7 @@ public:
|
|||||||
|
|
||||||
std::string command = "curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/insertOne' "
|
std::string command = "curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/insertOne' "
|
||||||
"--header 'Content-Type: application/json' "
|
"--header 'Content-Type: application/json' "
|
||||||
"--header 'api-key: Q1NfSCrruUAzsxdrjhZd3sjSwiqbdSFmCLeaCatZiuohUXsvEq9RtEAeG0JL2Jd7' "
|
"--header 'api-key: " + std::string(std::getenv("MongoDbApiKey")) + "' "
|
||||||
"--data-raw '" + json_data + "'";
|
"--data-raw '" + json_data + "'";
|
||||||
|
|
||||||
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
||||||
@@ -344,7 +344,7 @@ public:
|
|||||||
|
|
||||||
std::string command = "curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/find' "
|
std::string command = "curl --location 'https://eu-central-1.aws.data.mongodb-api.com/app/data-zvcqvrr/endpoint/data/v1/action/find' "
|
||||||
"--header 'Content-Type: application/json' "
|
"--header 'Content-Type: application/json' "
|
||||||
"--header 'api-key: Q1NfSCrruUAzsxdrjhZd3sjSwiqbdSFmCLeaCatZiuohUXsvEq9RtEAeG0JL2Jd7' "
|
"--header 'api-key: " + std::string(std::getenv("MongoDbApiKey")) + "' "
|
||||||
"--data-raw '" + json_data + "'";
|
"--data-raw '" + json_data + "'";
|
||||||
|
|
||||||
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
auto request = std::async(std::launch::async, &MongoDbService::execute_command, this, command);
|
||||||
|
|||||||
Reference in New Issue
Block a user