Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 34480fc

Browse files
committed
update
1 parent 04323fb commit 34480fc

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed

engine/cli/commands/engine_install_cmd.cc

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,16 @@ bool EngineInstallCmd::Exec(const std::string& engine,
115115
std::cout << "Selected " << selected_variant.value() << " - "
116116
<< selected_version.value() << std::endl;
117117

118-
auto install_url =
119-
url_parser::Url{.protocol = "http",
120-
.host = host_ + ":" + std::to_string(port_),
121-
.pathParams =
122-
{
123-
"v1",
124-
"engines",
125-
engine,
126-
},
127-
.queries = {
128-
{"version", selected_version.value()},
129-
{"variant", selected_variant.value()},
130-
}};
118+
auto install_url = url_parser::Url{
119+
.protocol = "http",
120+
.host = host_ + ":" + std::to_string(port_),
121+
.pathParams =
122+
{
123+
"v1",
124+
"engines",
125+
engine,
126+
},
127+
};
131128

132129
auto response = curl_utils::SimplePostJson(install_url.ToFullPath());
133130
if (response.has_error()) {

engine/cli/commands/engine_use_cmd.cc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,11 @@ cpp::result<void, std::string> EngineUseCmd::Exec(const std::string& host,
6262
return cpp::fail("Invalid version selection");
6363
}
6464

65-
auto set_default_engine_variant =
66-
url_parser::Url{.protocol = "http",
67-
.host = host + ":" + std::to_string(port),
68-
.pathParams = {"v1", "engines", engine, "default"},
69-
.queries = {{"version", selected_version.value()},
70-
{"variant", selected_variant.value()}}};
65+
auto set_default_engine_variant = url_parser::Url{
66+
.protocol = "http",
67+
.host = host + ":" + std::to_string(port),
68+
.pathParams = {"v1", "engines", engine, "default"},
69+
};
7170

7271
auto response =
7372
curl_utils::SimplePostJson(set_default_engine_variant.ToFullPath());

0 commit comments

Comments
 (0)