refactor: some lil things

This commit is contained in:
Jef Roosens 2025-01-05 12:48:07 +01:00
parent cc69935a88
commit 1bc9ae01d8
No known key found for this signature in database
GPG key ID: 21FD3D77D56BAF49
4 changed files with 43 additions and 43 deletions

View file

@ -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))