include meta in info endpoint

This commit is contained in:
2023-05-23 09:38:23 +02:00
parent 85204776d7
commit 6000553b95
2 changed files with 4 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ async fn one(path: web::Path<NotePath>) -> impl Responder {
let note = store::get(&p.id);
match note {
Ok(Some(_)) => HttpResponse::Ok().json(NoteInfo {}),
Ok(Some(n)) => HttpResponse::Ok().json(NoteInfo { meta: n.meta }),
Ok(None) => HttpResponse::NotFound().finish(),
Err(e) => HttpResponse::InternalServerError().body(e.to_string()),
}