From e9be685edfc23d35627f46426b3008caf41d46cd Mon Sep 17 00:00:00 2001 From: cloudhead Date: Thu, 25 Jan 2024 12:03:47 +0100 Subject: [PATCH] Fix code around default policies Make the code a little clearer and ensure that we are always calling the `Config` and not the `Store`, so that we fallback on the default policy. --- radicle-httpd/src/api/v1/node.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/radicle-httpd/src/api/v1/node.rs b/radicle-httpd/src/api/v1/node.rs index 4f17e8771..04a9e6ded 100644 --- a/radicle-httpd/src/api/v1/node.rs +++ b/radicle-httpd/src/api/v1/node.rs @@ -58,7 +58,12 @@ async fn node_policies_repos_handler(State(ctx): State) -> impl IntoRes let policies = ctx.profile.policies()?; let mut repos = Vec::new(); - for policy::Repo { id, scope, policy } in policies.seed_policies()? { + for policy::SeedPolicy { + rid: id, + scope, + policy, + } in policies.seed_policies()? + { repos.push(json!({ "id": id, "scope": scope,