fix(api): update block lookups to use all_blocks() after ScheduleConfig V2
This commit is contained in:
@@ -245,8 +245,7 @@ impl ScheduledSlotResponse {
|
||||
pub fn with_block_access(slot: domain::ScheduledSlot, channel: &domain::Channel) -> Self {
|
||||
let block_access_mode = channel
|
||||
.schedule_config
|
||||
.blocks
|
||||
.iter()
|
||||
.all_blocks()
|
||||
.find(|b| b.id == slot.source_block_id)
|
||||
.map(|b| b.access_mode.clone())
|
||||
.unwrap_or_default();
|
||||
|
||||
@@ -61,8 +61,7 @@ pub(super) async fn get_current_broadcast(
|
||||
Some(broadcast) => {
|
||||
let block_access_mode = channel
|
||||
.schedule_config
|
||||
.blocks
|
||||
.iter()
|
||||
.all_blocks()
|
||||
.find(|b| b.id == broadcast.slot.source_block_id)
|
||||
.map(|b| b.access_mode.clone())
|
||||
.unwrap_or_default();
|
||||
@@ -168,8 +167,7 @@ pub(super) async fn get_stream(
|
||||
// Block-level access check
|
||||
if let Some(block) = channel
|
||||
.schedule_config
|
||||
.blocks
|
||||
.iter()
|
||||
.all_blocks()
|
||||
.find(|b| b.id == broadcast.slot.source_block_id)
|
||||
{
|
||||
check_access(
|
||||
|
||||
Reference in New Issue
Block a user