Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions engine/cli/commands/engine_install_cmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ bool EngineInstallCmd::Exec(const std::string& engine,

httplib::Client cli(host_ + ":" + std::to_string(port_));
Json::Value json_data;
json_data["version"] = version.empty() ? "latest" : version;
auto data_str = json_data.toStyledString();
cli.set_read_timeout(std::chrono::seconds(60));
auto res = cli.Post("/v1/engines/install/" + engine, httplib::Headers(),
Expand Down
2 changes: 1 addition & 1 deletion engine/controllers/engines.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void Engines::InstallEngine(
return;
}

auto version{"latest"};
auto version = (*(req->getJsonObject())).get("version", "latest").asString();
auto result = engine_service_->InstallEngineAsync(engine, version);
if (result.has_error()) {
Json::Value res;
Expand Down
Loading