use askama::Template; use axum::{ debug_handler, extract::{Extension, Query, State}, response::{Html, IntoResponse}, }; use common::web_api; use crate::{ app::{Context, Result}, data::db, html_templates::*, }; #[debug_handler] pub async fn recipes_list_fragments( State(connection): State, params: Query, Extension(context): Extension, ) -> Result { Ok(Html( RecipesListFragmentTemplate { recipes: Recipes::new( connection, &context.user, context.tr.current_lang_code(), params.current_recipe_id, ) .await?, context, } .render()?, )) }