frontend will not call backend if id is 0

This commit is contained in:
John O'Keefe 2024-09-17 18:42:29 -04:00
parent 74afb317d1
commit 5cdf86a147

View File

@ -148,7 +148,7 @@
submitData[key] = value
}
if (isAniListLoggedIn) {
if (isAniListLoggedIn && currentAniListAnime.data.MediaList.mediaId !== 0) {
let body: AniListUpdateVariables = {
mediaId: currentAniListAnime.data.MediaList.mediaId,
progress: submitData.episodes,
@ -182,7 +182,7 @@
})
}
if (malLoggedIn) {
if (malLoggedIn && currentMalAnime.id !== 0) {
let body: MALUploadStatus = {
status: submitData.status.mal,
is_rewatching: submitData.repeat > 0,
@ -217,7 +217,7 @@
})
}
if (simklLoggedIn) {
if (simklLoggedIn && currentSimklAnime.show.ids.simkl !== 0) {
if (currentSimklAnime.watched_episodes_count !== submitData.episodes) {
await SimklSyncEpisodes(currentSimklAnime, submitData.episodes).then((value: SimklAnime) => {
AddAnimeServiceToTable({