implement get single index

This commit is contained in:
mpostma 2021-03-06 20:17:58 +01:00
parent 281a445998
commit ced32afd9f
No known key found for this signature in database
GPG key ID: CBC8A7C1D7A28C3A
3 changed files with 15 additions and 7 deletions

View file

@ -37,7 +37,7 @@ async fn get_index(
data: web::Data<Data>,
path: web::Path<IndexParam>,
) -> Result<HttpResponse, ResponseError> {
match data.index(&path.index_uid)? {
match data.index(&path.index_uid).await? {
Some(meta) => {
let json = serde_json::to_string(&meta).unwrap();
Ok(HttpResponse::Ok().body(json))