Add route "/" for ping
Signed-off-by: Tiago Garcia <tiago.rgarcia@ua.pt>
This commit is contained in:
parent
2409ec8f5a
commit
d514ea5aab
|
@ -8,6 +8,17 @@ Routes::Routes(nlohmann::json config) {
|
||||||
const nlohmann::json config_run_scripts = config["run-scripts"];
|
const nlohmann::json config_run_scripts = config["run-scripts"];
|
||||||
const nlohmann::json config_tokens = config["tokens"];
|
const nlohmann::json config_tokens = config["tokens"];
|
||||||
|
|
||||||
|
CROW_ROUTE(this->app, "/")
|
||||||
|
.methods("POST"_method)
|
||||||
|
.name("Ping")
|
||||||
|
([]() {
|
||||||
|
nlohmann::json response = {
|
||||||
|
{"status", 200},
|
||||||
|
{"message", "Pong"}
|
||||||
|
};
|
||||||
|
return crow::response(200, response.dump());
|
||||||
|
});
|
||||||
|
|
||||||
CROW_ROUTE(this->app, "/update-files")
|
CROW_ROUTE(this->app, "/update-files")
|
||||||
.methods("POST"_method)
|
.methods("POST"_method)
|
||||||
.name("Update Files")
|
.name("Update Files")
|
||||||
|
|
Loading…
Reference in New Issue