More refactoring and bug fixes

- Added `libhttp` and `librest_api` targets to CMakeLists.txt
- Added examples for `libhttp` and `librest_api` in examples directory
- Added `cache` and `add` commands
- Added documentation for `libhttp` and `librest_api`
- Added all available HTTP response codes to REST API
- Changed how `bin/compile.sh` works (must supply args to build)
This commit is contained in:
David Allen 2023-05-27 11:28:58 -06:00
parent 5a73651ad1
commit 8b1f1374d8
23 changed files with 575 additions and 164 deletions

View file

@ -130,12 +130,12 @@ namespace gdpm::config{
/* Must check if keys exists first, then populate `_config_params`. */
if(doc.HasMember("remote_sources")){
if(doc["remote_sources"].IsArray()){
if(doc["remote_sources"].IsObject()){
const Value& srcs = doc["remote_sources"];
for(auto& src : srcs.GetObject()){
// config.remote_sources.push_back(src.GetString());
config.remote_sources.insert(
std::pair(src.name.GetString(), src.value.GetString())
string_pair(src.name.GetString(), src.value.GetString())
);
}
} else {