updated import service
This commit is contained in:
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,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user