Skip to main content

test_template

Function test_template 

Source
pub async fn test_template(
    __arg0: State<Arc<AppState>>,
    __arg1: Extension<JWTAuthMiddleware>,
    __arg2: Json<TemplateTestForm>,
) -> impl IntoResponse
Expand description

Dry-runs a template against the caller’s own data: compiles it against the render surface, renders it (DB-backed), and reports whether the resulting draft can pre-fill the create form. Lets an author see “does this work?” before saving — surfacing the same compile / render / not-representable failures the create page would otherwise hit silently. Mutates nothing.