Anime lists didn't age well 😵‍💫

This commit is contained in:
daru
2022-08-25 23:31:18 +02:00
parent dbd34abea1
commit 730f91e74e
6 changed files with 48 additions and 42 deletions

22
ober.go
View File

@@ -692,26 +692,18 @@ func processUpdateReq(ctx *fasthttp.RequestCtx, update bool) {
if update {
// anime exitsts => save
// get watch progress
progress, updated, _, listState, _ := FetchProgress(anime.Anime, username, false)
progress, updated, _, listState, _ := FetchProgress(anime.Anime, username)
// anime is already completed big baka user
if listState == malApiStatusC {
// One shot retry messy solution with refetch
progress, updated, _, listState, _ = FetchProgress(anime.Anime, username, true)
if listState == malApiStatusC {
ctx.WriteString("Du hast schon fertig geschaut bro")
ctx.SetStatusCode(fasthttp.StatusConflict)
return
}
ctx.WriteString("Du hast schon fertig geschaut bro")
ctx.SetStatusCode(fasthttp.StatusConflict)
return
}
// anime is already dropped big baka user
if listState == malApiStatusD {
// One shot retry messy solution with refetch
progress, updated, _, listState, _ = FetchProgress(anime.Anime, username, true)
if listState == malApiStatusD {
ctx.WriteString("Du hast schon gedropped bro")
ctx.SetStatusCode(fasthttp.StatusConflict)
return
}
ctx.WriteString("Du hast schon gedropped bro")
ctx.SetStatusCode(fasthttp.StatusConflict)
return
}
animeData, err = AddUserToAnime(username, userId, anime.Anime, progress, updated)
} else {