Skip to content

Commit

Permalink
fix: removed hbs invalid comma
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobressan committed Sep 27, 2024
1 parent c86d413 commit 2d5193c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/domain/resource/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use base64::{prelude::BASE64_STANDARD_NO_PAD, Engine};
use bech32::{Bech32m, Hrp};
use chrono::Utc;
use rand::rngs::OsRng;
use tracing::info;
use tracing::{error, info};
use uuid::Uuid;

use crate::domain::{
Expand Down Expand Up @@ -34,11 +34,10 @@ pub async fn fetch(
.await?
.into_iter()
.map(|mut resource| {
if let Ok(annotations) =
metadata.render_hbs(&resource.kind.to_lowercase(), &resource.spec)
{
resource.annotations = Some(annotations);
}
match metadata.render_hbs(&resource.kind.to_lowercase(), &resource.spec) {
Ok(annotations) => resource.annotations = Some(annotations),
Err(error) => error!(?error),
};

resource
})
Expand All @@ -59,9 +58,10 @@ pub async fn fetch_by_id(

assert_project_permission(project_cache.clone(), &cmd.credential, &resource.project_id).await?;

if let Ok(annotations) = metadata.render_hbs(&resource.kind.to_lowercase(), &resource.spec) {
resource.annotations = Some(annotations);
}
match metadata.render_hbs(&resource.kind.to_lowercase(), &resource.spec) {
Ok(annotations) => resource.annotations = Some(annotations),
Err(error) => error!(?error),
};

Ok(resource)
}
Expand Down

0 comments on commit 2d5193c

Please sign in to comment.