Implement CreateKey, DeleteKey and rudimentary UpdateKey

This commit is contained in:
Alex Auvolat
2022-05-11 11:40:26 +02:00
parent 5c00c9fb46
commit 393b76ecba
7 changed files with 227 additions and 105 deletions
+5
View File
@@ -136,10 +136,15 @@ impl ApiHandler for AdminApiServer {
Endpoint::GetKeyInfo { id, search } => {
handle_get_key_info(&self.garage, id, search).await
}
Endpoint::CreateKey => handle_create_key(&self.garage, req).await,
Endpoint::UpdateKey { id } => handle_update_key(&self.garage, id, req).await,
Endpoint::DeleteKey { id } => handle_delete_key(&self.garage, id).await,
/*
_ => Err(Error::NotImplemented(format!(
"Admin endpoint {} not implemented yet",
endpoint.name()
))),
*/
}
}
}