Standardize the construction of intermediate BlogPostPage.

This commit is contained in:
Tom Alexander
2023-12-19 17:09:11 -05:00
parent 261fe8a1a2
commit 4bb1f9983a
27 changed files with 405 additions and 248 deletions

View File

@@ -8,14 +8,20 @@ pub(crate) struct ITable {
pub(crate) children: Vec<ITableRow>,
}
intermediate!(ITable, Table, original, registry, {
let children = {
let mut ret = Vec::new();
for obj in original.children.iter() {
ret.push(ITableRow::new(registry.clone(), obj).await?);
}
ret
};
intermediate!(
ITable,
&'orig organic::types::Table<'parse>,
original,
registry,
{
let children = {
let mut ret = Vec::new();
for obj in original.children.iter() {
ret.push(ITableRow::new(registry.clone(), obj).await?);
}
ret
};
Ok(ITable { children })
});
Ok(ITable { children })
}
);