add favorit button in entry page

This commit is contained in:
X4Lo committed 2024-04-28 00:26:07 +01:00
1 parent 62056bdc98
commit 299f566b96
6 files changed
+130 -45

No files matched your search

+4 -1
View File
@@ -9,7 +9,7 @@ const Episode = require('../models/Episode.js');
async function saveEntry(data) {
if (data == null) return;
// creating the object
var is_tvseries = data.release_date == null ? true : false;
@@ -24,6 +24,7 @@ async function saveEntry(data) {
country: data.production_countries.length > 0 ? data.production_countries[0].name : null,
is_tvseries: is_tvseries,
watchlist: true,
status: data.status,
genres: data.genre_ids,
@@ -99,6 +100,8 @@ async function saveEntry(data) {
episodes.push(savedEpisode);
}
// TODO fetch cast
savedSeason.setDataValue('episodes', episodes);
seasons.push(savedSeason)
}