rewrote the Anime.svelte to move out helper functions and clean up code
This commit is contained in:
@ -55,7 +55,7 @@ func (a *App) GetMyAnimeList(count int) MALWatchlist {
|
||||
return malList
|
||||
}
|
||||
|
||||
func (a *App) MyAnimeListUpdate(anime MALAnime, update MALUploadStatus) MyListStatus {
|
||||
func (a *App) MyAnimeListUpdate(anime MALAnime, update MALUploadStatus) MalListStatus {
|
||||
if update.NumTimesRewatched >= 1 {
|
||||
update.IsRewatching = true
|
||||
} else {
|
||||
@ -70,7 +70,7 @@ func (a *App) MyAnimeListUpdate(anime MALAnime, update MALUploadStatus) MyListSt
|
||||
body.Set("comments", update.Comments)
|
||||
|
||||
malUrl := "https://api.myanimelist.net/v2/anime/" + strconv.Itoa(anime.Id) + "/my_list_status"
|
||||
var status MyListStatus
|
||||
var status MalListStatus
|
||||
respBody := MALHelper("PATCH", malUrl, body)
|
||||
err := json.Unmarshal(respBody, &status)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user