updated import service

This commit is contained in:
X4Lo committed 2024-06-05 16:52:44 +01:00
1 parent d6c3a974a1
commit 95e08acc8f
2 files changed
+260 -25

No files matched your search

@@ -11,6 +11,25 @@ export class ImporterService {
private apiAction = 'entries';
constructor(private http: HttpClient) {}
bulkAddEntries(values: any) {
return this.http.post<any[]>(
`${this.backend_apiUrl}/${this.apiAction}/bulk-import-tmdb`,
{
values: values,
}
);
}
bulkAddEpisodesSeen(values: any) {
return this.http.post<any>(
`${this.backend_apiUrl}/${this.apiAction}/bulk-import-episodes-seen`,
{
values: values,
}
);
}
bulkAddWithDateSeen(values: string) {
const separator = ',';
@@ -35,4 +54,14 @@ export class ImporterService {
}
);
}
bulkAddEpisodes(episodes: string) {
// ? consuming the backend API
return this.http.post<Entry[]>(
`${this.backend_apiUrl}/${this.apiAction}/bulk-import-episodes`,
{
episodes: episodes,
}
);
}
}