tv app
This commit is contained in:
@@ -2,8 +2,8 @@ import { Injectable } from '@angular/core';
|
||||
import { HttpClient, HttpParams, HttpErrorResponse } from '@angular/common/http';
|
||||
import { Observable, throwError } from 'rxjs';
|
||||
import { catchError, tap } from 'rxjs/operators';
|
||||
import { AvisoDto } from './aviso.dto'; // Importiere das Interface
|
||||
import { AvisoTvSettingsDto } from './aviso-tv-settings.dto'; // Importiere das neue Interface
|
||||
import { AvisoDto, TvSettings } from './aviso.dto'; // Importiere das Interface
|
||||
import { AvisoTvTextSettingsDto } from './aviso-tv-settings.dto'; // Importiere das neue Interface
|
||||
|
||||
// Definiere die Response Interfaces
|
||||
export interface AvisoArrivalsResponse {
|
||||
@@ -45,10 +45,18 @@ export class AvisoService {
|
||||
/**
|
||||
* Holt die Aviso TV Einstellungen basierend auf dem übergebenen Standort.
|
||||
* @param standort Standort zur Filterung der Einstellungen.
|
||||
* @returns Ein Observable von AvisoTvSettingsDto[].
|
||||
* @returns Ein Observable von AvisoTvTextSettingsDto[].
|
||||
*/
|
||||
getAvisoTvSettings(standort: string): Observable<AvisoTvSettingsDto[]> {
|
||||
return this.http.get<AvisoTvSettingsDto[]>(`${this.baseUrl}/${standort}`)
|
||||
getAvisoTvTextSettings(standort: string): Observable<AvisoTvTextSettingsDto[]> {
|
||||
return this.http.get<AvisoTvTextSettingsDto[]>(`${this.baseUrl}/${standort}`)
|
||||
.pipe(
|
||||
tap(data => console.log('AvisoService received TV Text settings data:', data)), // Logge die empfangenen Daten
|
||||
catchError(this.handleError)
|
||||
);
|
||||
}
|
||||
|
||||
getAvisoTvSettings(standortID: number): Observable<TvSettings[]> {
|
||||
return this.http.get<TvSettings[]>(`${this.baseUrl}/AvisoTvSettings/Standort/${standortID}`)
|
||||
.pipe(
|
||||
tap(data => console.log('AvisoService received TV settings data:', data)), // Logge die empfangenen Daten
|
||||
catchError(this.handleError)
|
||||
|
||||
Reference in New Issue
Block a user