Introduce register rest methosd

This commit is contained in:
Hepatica
2024-08-16 01:14:47 +02:00
parent 38c1bd4633
commit 964fd201c6
3 changed files with 138 additions and 9 deletions

View File

@@ -1,8 +1,8 @@
//// ReSharper disable CppClangTidyBugproneSuspiciousInclude
//
//#include <bsoncxx/json.hpp>
//#include <mongocxx/client.hpp>
//#include <mongocxx/instance.hpp>
// ReSharper disable CppClangTidyBugproneSuspiciousInclude
//#include <curl/curl.h>/*
#include <iostream>
//#include "../src/mongocxx/"s
class MongoDbService
{
@@ -10,7 +10,18 @@ class MongoDbService
public:
MongoDbService()
{
//mongocxx::instance inst{};
//const auto uri = mongocxx::uri{ "mongodb+srv://loker:<password>@spcloudcluster.xwpnw.mongodb.net/?retryWrites=true&w=majority&appName=SpCloudCluster" };
//// Set the version of the Stable API on the client
//mongocxx::options::client client_options;
//const auto api = mongocxx::options::server_api{ mongocxx::options::server_api::version::k_version_1 };
//client_options.server_api_opts(api);
//// Setup the connection and get a handle on the "admin" database.
//mongocxx::client conn{ uri, client_options };
//mongocxx::database db = conn["admin"];
//// Ping the database.
//const auto ping_cmd = bsoncxx::builder::basic::make_document(bsoncxx::builder::basic::kvp("ping", 1));
//db.run_command(ping_cmd.view());
//std::cout << "Pinged your deployment. You successfully connected to MongoDB!" << std::endl;
}
};