MAL progress fetch

This commit is contained in:
daru
2022-04-18 02:53:09 +02:00
parent 8fe7bf4d4b
commit 994bccb068
7 changed files with 125 additions and 18 deletions

View File

@@ -432,7 +432,9 @@ func processUpdateReq(ctx *fasthttp.RequestCtx, update bool) {
// update or delete request
if update {
// anime exitsts => save
animeData, err = AddUserToAnime(username, userId, anime.Anime)
// get watch progress
progress, updated, _ := FetchProgress(anime.Anime, userId, username, 0)
animeData, err = AddUserToAnime(username, userId, anime.Anime, progress, updated)
} else {
// anime exitsts => delete
animeData, err = DeleteUserFromAnime(username, userId, anime.Anime)