refactor: some lil things
This commit is contained in:
parent
cc69935a88
commit
1bc9ae01d8
4 changed files with 43 additions and 43 deletions
|
|
@ -24,7 +24,7 @@ async fn get_plant_page(
|
|||
Path(plant_id): Path<i32>,
|
||||
) -> Html<String> {
|
||||
let (plant, comments) = tokio::task::spawn_blocking(move || {
|
||||
let plant = Plant::with_id(&ctx.pool, plant_id)?.unwrap();
|
||||
let plant = Plant::by_id(&ctx.pool, plant_id)?.unwrap();
|
||||
let comments = plant.comments(&ctx.pool)?;
|
||||
|
||||
Ok::<_, DbError>((plant, comments))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue