Compare commits

..

No commits in common. "5339c1f791418ab3b14981d59c94a8df90436208" and "fa79e479759365316f136106935278fd4efaff1a" have entirely different histories.

2 changed files with 5 additions and 9 deletions

View File

@ -32,9 +32,11 @@ You can see the config file format below.
git clone https://github.com/TiagoRG/gh-wh-handler.git
```
2. Move to the build directory:
2. Create the build directory:
```console
cd gh-wh-handler/build
cd gh-wh-handler
mkdir build
cd build
```
3. Run CMake:

View File

@ -121,11 +121,7 @@ crow::response update_files(const nlohmann::json& config_update_files, const nlo
{"status", 200},
{"message", "OK"},
{"file_count", 0},
{"updated-files", nlohmann::json::array()},
{"post-update", {
{"successful", nlohmann::json::array()},
{"failed", nlohmann::json::array()}
}}
{"updated-files", nlohmann::json::array()}
};
for (auto &file : modified_files) {
std::string remote_path = file[0];
@ -155,10 +151,8 @@ crow::response update_files(const nlohmann::json& config_update_files, const nlo
int return_code = std::system(action.c_str());
if (return_code == 0) {
Logger::success("[/update-files] Post-update action " + action + " ran successfully");
response["post-update"]["successful"].push_back(action);
} else {
Logger::error("[/update-files] Post-update action " + action + " failed with return code " + std::to_string(return_code));
response["post-update"]["failed"].push_back(action);
}
}