Skip to content

Commit db0d75d

Browse files
committed
fix(namespace): bring namespace_list api calls up to date
1 parent e7a7fa7 commit db0d75d

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

engine/artifacts/openapi.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

engine/packages/namespace/src/ops/get_global.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,18 @@ pub async fn namespace_get_global(ctx: &OperationCtx, input: &Input) -> Result<V
3030
let url = leader_dc.peer_url.join(&format!("/namespaces"))?;
3131
let res = client
3232
.get(url)
33-
.query(
34-
&namespace_ids
35-
.iter()
36-
.map(|ns_id| ("namespace_id", ns_id))
37-
.collect::<Vec<_>>(),
38-
)
33+
.query(&rivet_api_types::namespaces::list::ListQuery {
34+
namespace_ids: Some(
35+
namespace_ids
36+
.iter()
37+
.map(|ns_id| ns_id.to_string())
38+
.collect::<Vec<_>>()
39+
.join(","),
40+
),
41+
limit: None,
42+
cursor: None,
43+
name: None,
44+
})
3945
.send()
4046
.await?;
4147

engine/packages/namespace/src/ops/resolve_for_name_global.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ pub async fn namespace_resolve_for_name_global(
3333
let url = leader_dc.peer_url.join("/namespaces")?;
3434
let res = client
3535
.get(url)
36-
.query(&[("name", &input.name)])
36+
.query(&rivet_api_types::namespaces::list::ListQuery {
37+
namespace_ids: None,
38+
limit: None,
39+
cursor: None,
40+
name: Some(input.name.clone()),
41+
})
3742
.send()
3843
.custom_instrument(tracing::info_span!("namespaces_http_request"))
3944
.await?;

0 commit comments

Comments
 (0)