app,server: Display rating in recipe
This commit is contained in:
parent
1ea5c8aafa
commit
5ef000dec0
3 changed files with 28 additions and 8 deletions
|
|
@ -76,7 +76,7 @@ pub(super) async fn list_recipes(
|
|||
.all(&state.db)
|
||||
.await?
|
||||
.into_iter()
|
||||
.map(|r| (r.id, r.name))
|
||||
.map(|r| (r.id, r.name, r.ranking as _))
|
||||
.collect(),
|
||||
}
|
||||
.into())
|
||||
|
|
@ -144,6 +144,7 @@ pub(super) async fn fetch_recipe(
|
|||
Ok(RecipeInfo {
|
||||
name: recipe.name,
|
||||
steps: recipe.steps,
|
||||
rating: recipe.ranking as _,
|
||||
ingredients,
|
||||
}
|
||||
.into())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue