Move crates to toplevel directory

This commit is contained in:
Elias Projahn 2021-02-07 12:53:25 +01:00
parent d16961efa8
commit 0ffe68e04f
127 changed files with 15 additions and 13 deletions

View file

@ -1,17 +0,0 @@
use crate::{Client, Result};
use musicus_database::Ensemble;
impl Client {
/// Get all available ensembles from the server.
pub async fn get_ensembles(&self) -> Result<Vec<Ensemble>> {
let body = self.get("ensembles").await?;
let ensembles: Vec<Ensemble> = serde_json::from_str(&body)?;
Ok(ensembles)
}
/// Post a new ensemble to the server.
pub async fn post_ensemble(&self, data: &Ensemble) -> Result<()> {
self.post("ensembles", serde_json::to_string(data)?).await?;
Ok(())
}
}