add calendar page + backend

This commit is contained in:
X4Lo committed 2024-09-10 01:24:02 +01:00
1 parent f73deb4f2d
commit 4fbbc4b113
16 files changed
+15635 -5474

No files matched your search

+8 -1
View File
@@ -16,10 +16,17 @@ import { ThemeService } from './services/theme.service';
import { SeasonService } from './services/season.service';
import { SearchPopupComponent } from './components/search-popup/search-popup.component';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { SharedModule } from '../shared/shared.module';
@NgModule({
declarations: [SidebarComponent, NavbarComponent, SearchPopupComponent],
imports: [CommonModule, RouterModule, FormsModule, ReactiveFormsModule],
imports: [
CommonModule,
SharedModule,
RouterModule,
FormsModule,
ReactiveFormsModule,
],
providers: [
TmdbService,
LibraryService,
@@ -1,6 +1,8 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { environment } from '../../../environments/environment.prod';
import { EpisodeDTO } from '../../shared/models/dtos/episode.dto';
import { Observable } from 'rxjs';
@Injectable({
providedIn: 'root',
@@ -10,4 +12,13 @@ export class EpisodeService {
private apiAction = 'episodes';
constructor(private http: HttpClient) {}
getMonthEpisodes(
startDate: string,
endDate: string
): Observable<EpisodeDTO[]> {
return this.http.get<EpisodeDTO[]>(
`${this.backend_apiUrl}/${this.apiAction}/month/${startDate}/${endDate}`
);
}
}