mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-09 05:30:28 +08:00
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.
This commit is contained in:
@@ -58,7 +58,12 @@ async fn node_policies_repos_handler(State(ctx): State<Context>) -> 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,
|
||||
|
||||
Reference in New Issue
Block a user