Actions: Load Streams/Detail
@@ -9,19 +9,23 @@ pub enum ActionLoad {
// @TODO most of these values need content
CatalogGrouped { extra: Vec<ExtraProp> },
CatalogFiltered,
- Detail,
- Streams,
+ Detail { type_name: String, id: String },
+ Streams { type_name: String, id: String },
AddonCatalog,
}
impl ActionLoad {
pub fn addon_aggr_req(&self) -> Option<AggrRequest> {
// @TODO map CatalogFiltered to FromAddon
- // @TODO map Detail/Streams to AllOfResource
- // etc.
match self {
ActionLoad::CatalogGrouped { extra } => Some(AggrRequest::AllCatalogs {
extra: extra.to_owned(),
}),
+ ActionLoad::Detail { type_name, id } => Some(AggrRequest::AllOfResource(
+ ResourceRef::without_extra("meta", type_name, id),
+ )),
+ ActionLoad::Streams { type_name, id } => Some(AggrRequest::AllOfResource(
+ ResourceRef::without_extra("catalog", type_name, id),
+ )),
_ => None,
}
}
