Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Fix names
Browse files Browse the repository at this point in the history
  • Loading branch information
afsalthaj authored and senia-psm committed Feb 26, 2024
1 parent 6f1895c commit db11a6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/clients/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl<C: golem_client::api::TemplateClient + Sync + Send> TemplateClient for Temp

let name = name.map(|n| n.0);

let templates: Vec<Template> = self.client.get_all_templates(name.as_deref()).await?;
let templates: Vec<Template> = self.client.get_templates(name.as_deref()).await?;
let views = templates.iter().map(|c| c.into()).collect();
Ok(views)
}
Expand All @@ -210,7 +210,7 @@ impl<C: golem_client::api::TemplateClient + Sync + Send> TemplateClient for Temp
.await
.map_err(|e| GolemError(format!("Can't open template file: {e}")))?;

self.client.upload_template(&name.0, file).await?
self.client.create_template(&name.0, file).await?
}
PathBufOrStdin::Stdin => {
let mut bytes = Vec::new();
Expand All @@ -219,7 +219,7 @@ impl<C: golem_client::api::TemplateClient + Sync + Send> TemplateClient for Temp
.read_to_end(&mut bytes) // TODO: steaming request from stdin
.map_err(|e| GolemError(format!("Failed to read stdin: {e:?}")))?;

self.client.upload_template(&name.0, bytes).await?
self.client.create_template(&name.0, bytes).await?
}
};

Expand Down

0 comments on commit db11a6e

Please sign in to comment.