This commit is contained in:
Your Name
2025-05-03 16:56:10 +12:00
parent e275818050
commit 764a5e030f
2 changed files with 6 additions and 0 deletions

View File

@@ -27,6 +27,8 @@ Public read actions:
- get all metadata for a tag:
- `curl http://localhost:8123/meta/squashkiwi:latest`
- quick status check:
- `curl http://localhost:8123/status`
Write actions:

View File

@@ -184,6 +184,10 @@ void Server::setup_routes() {
server_.Get("/appendtag", [this](const httplib::Request& req, httplib::Response& res) {
handle_append_tag(req, res);
});
server_.Get("/status", [this](const httplib::Request& req, httplib::Response& res) {
res.set_content(nlohmann::json({{"result", "success"}, {"status", "ok"}}).dump(), "application/json");
});
}
void Server::handle_get_object(const httplib::Request& req, httplib::Response& res) {