add episode seen history in entry page

This commit is contained in:
X4Lo committed 2024-04-22 17:41:30 +01:00
1 parent cf305cabae
commit dbeb0ee524
11 files changed
+288 -64

No files matched your search

@@ -11,17 +11,28 @@ export class EpisodeSeenService {
constructor(private http: HttpClient) {}
createEpisodeSeen(episodeId: number, dateSeen: Date, seenWith: string) {
createEpisodeSeen(
entryId: number,
episodeId: number,
dateSeen: Date,
seenWith: string
) {
return this.http.post<EpisodeSeen>(
`${this.backend_apiUrl}/${this.apiAction}`,
{
entry_id: entryId,
episode_id: episodeId,
date_seen: dateSeen,
seen_with: seenWith,
}
);
}
getEpisodeSeenByEntryId(entryId: number) {
return this.http.get<any[]>(
`${this.backend_apiUrl}/${this.apiAction}/by-entry/${entryId}`
);
}
// get episode-seen by episode Id
getEpisodeSeenById(id: number) {