fix(presentation): extract 12 handler violations to use cases

- TokenService port + JwtTokenService adapter; login/refresh return LoginResult
- delete get_token (dup of login); create_tokens helper removed
- type UpdateChannelRequest schedule_config/recycle_policy (no serde_json::Value)
- update_settings returns updated Vec; handler calls one use case
- config use case in application::config; handler maps DTO only
- SyncStatusEntry moved to api-types w/ From<LibrarySyncLogEntry>
- trigger_sync: Conflict error, drop sync_trigger.send from handler
- UpsertProviderCommand.config accepts Value; serialization in use case
- get_current_broadcast returns BroadcastWithChannel; one call
- get_stream_url resolves broadcast internally; handler single call
This commit is contained in:
2026-07-12 05:28:49 +02:00
parent 9b18d3ff6d
commit 33b440d297
44 changed files with 414 additions and 280 deletions

View File

@@ -35,10 +35,10 @@ pub async fn get_active_schedule(deps: &Arc<ScheduleDeps>, channel_id: Uuid) ->
pub async fn get_current_broadcast(deps: &Arc<ScheduleDeps>, channel_id: Uuid) -> String {
let query = GetCurrentBroadcastQuery { channel_id };
match application::schedule::get_current_broadcast::execute(deps, query).await {
Ok(Some(b)) => {
let offset = b.offset_secs();
Ok(Some(result)) => {
let offset = result.broadcast.offset_secs();
ok_json(&CurrentBroadcastDto {
slot: b.into_slot(),
slot: result.broadcast.into_slot(),
offset_secs: offset,
})
}