feat: preserve stereo channels and require reviewed speaker roles
This commit is contained in:
@@ -78,9 +78,10 @@ final class FollowupAudioController extends BaseAdminController
|
||||
|
||||
public function saveDraft()
|
||||
{
|
||||
return $this->handle(true, ['id', 'version', 'items'], fn (array $p): array =>
|
||||
return $this->handle(true, ['id', 'version', 'items', 'channel_roles'], fn (array $p): array =>
|
||||
Logic::saveDraft($this->positive($p, 'id'), $this->positive($p, 'version'),
|
||||
$this->items($p), $this->adminId, $this->adminInfo));
|
||||
$this->items($p), $this->adminId, $this->adminInfo,
|
||||
array_key_exists('channel_roles', $p) ? $this->textValue($p, 'channel_roles', 20) : null));
|
||||
}
|
||||
|
||||
public function apply()
|
||||
|
||||
@@ -71,12 +71,12 @@ final class FollowupAudioLogic
|
||||
return self::protectDetail(Store::detail($id), $actor, $info);
|
||||
}
|
||||
|
||||
public static function saveDraft(int $id, int $version, array $items, int $actor, array $info): array
|
||||
public static function saveDraft(int $id, int $version, array $items, int $actor, array $info, ?string $channelRoles = null): array
|
||||
{
|
||||
self::requireEnabled();
|
||||
$task = Access::task($id, $actor, $info);
|
||||
self::checkDailyItems($task, $items, $actor, $info);
|
||||
return self::protectDetail(Store::saveDraft($id, $version, $items, $actor), $actor, $info);
|
||||
return self::protectDetail(Store::saveDraft($id, $version, $items, $actor, $channelRoles), $actor, $info);
|
||||
}
|
||||
|
||||
public static function apply(int $id, int $version, array $items, int $actor, array $info): array
|
||||
|
||||
Reference in New Issue
Block a user