implement get single udpate

This commit is contained in:
mpostma 2021-03-06 10:51:52 +01:00
parent a9c7b73744
commit 7d28f8cff0
No known key found for this signature in database
GPG key ID: CBC8A7C1D7A28C3A
6 changed files with 38 additions and 8 deletions

View file

@ -150,8 +150,13 @@ impl IndexController {
todo!()
}
fn update_status(&self, index: String, id: u64) -> anyhow::Result<Option<UpdateStatus>> {
todo!()
pub async fn update_status(&self, index: String, id: u64) -> anyhow::Result<Option<UpdateStatus>> {
let uuid = self.uuid_resolver
.resolve(index)
.await?
.context("index not found")?;
let result = self.update_handle.update_status(uuid, id).await?;
Ok(result)
}
pub async fn all_update_status(&self, index: String) -> anyhow::Result<Vec<UpdateStatus>> {