Add get_frontend_app to the project networking crate
The CLI could list a project's frontend apps but not fetch one by id. The MCP frontend_app_show tool and project_use need the single lookup. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Seto Elkahfi committed
Oct 18, 2026 at 10:24 UTC
8390820ba77453576262d721cfe55d388dc89b89
2 files changed
+25
-1
crates/smbcloud-networking-project/src/crud_frontend_app_read.rs
+14
-1
@@ -1,5 +1,5 @@
1
use {
2
- crate::url_builder::build_frontend_apps_url,
2
+ crate::url_builder::{build_frontend_app_url, build_frontend_apps_url},
3
reqwest::Client,
4
smbcloud_model::{error_codes::ErrorResponse, frontend_app::FrontendApp},
5
smbcloud_network::{environment::Environment, network::request},
@@ -23,3 +23,16 @@ pub async fn get_frontend_apps_by_project(
23
.header("User-agent", SMB_USER_AGENT);
24
request(builder).await
25
}
26
+
27
+pub async fn get_frontend_app(
28
+ env: Environment,
29
+ client: (&SmbClient, &str),
30
+ access_token: String,
31
+ frontend_app_id: &str,
32
+) -> Result<FrontendApp, ErrorResponse> {
33
+ let builder = Client::new()
34
+ .get(build_frontend_app_url(env, client, frontend_app_id))
35
+ .header("Authorization", access_token)
36
+ .header("User-agent", SMB_USER_AGENT);
37
+ request(builder).await
38
+}
crates/smbcloud-networking-project/src/url_builder.rs
+11
@@ -15,6 +15,17 @@ pub(crate) fn build_frontend_apps_url(env: Environment, client: (&SmbClient, &st
15
url_builder.build()
16
}
17
18
+pub(crate) fn build_frontend_app_url(
19
+ env: Environment,
20
+ client: (&SmbClient, &str),
21
+ frontend_app_id: &str,
22
+) -> String {
23
+ let mut url_builder = smb_base_url_builder(env, client);
24
+ url_builder.add_route("v1/frontend_apps");
25
+ url_builder.add_route(frontend_app_id);
26
+ url_builder.build()
27
+}
28
+
29
pub(crate) fn build_frontend_app_update_deploy_config_url(
30
env: Environment,
31
client: (&SmbClient, &str),