diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-06-30 21:36:56 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-06-30 21:36:56 +0530 |
commit | e96531d4f83129d9ded98d3dbb76eeef6fb679e9 (patch) | |
tree | beaab95c39f3187eb434319c1459b9b2d216e16a | |
parent | 05f7943ee7267e305d40be8afc2e404421ee5742 (diff) |
Passing in selectedManga instead of manga to ui.MangaStatusMenu to properly display current status
-rw-r--r-- | cmd/status.go | 8 | ||||
-rw-r--r-- | cmd/version.go | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/cmd/status.go b/cmd/status.go index 6a23bfd..05b9dc4 100644 --- a/cmd/status.go +++ b/cmd/status.go @@ -83,7 +83,7 @@ func setAnimeStatus(statusInput, searchInput string) { } if statusInput == "" { - ui.AnimeStatusMenu(anime) + ui.AnimeStatusMenu(selectedAnime) } else { resp := mal.SetAnimeStatus(anime.Id, statusInput) fmt.Println(ui.CreateStatusUpdateConfirmationMessage(anime.Title, resp.Status)) @@ -102,7 +102,7 @@ func setMangaStatus(statusInput, searchInput string) { } manga := ui.MangaSearch("Select Manga:", searchInput) - selectedManga := mal.GetAnimeData(manga.Id, []string{"my_list_status"}) + selectedManga := mal.GetMangaData(manga.Id, []string{"my_list_status"}) if queryOnlyMode { status := selectedManga.MyListStatus.Status @@ -112,9 +112,9 @@ func setMangaStatus(statusInput, searchInput string) { } if statusInput == "" { - ui.MangaStatusMenu(manga) + ui.MangaStatusMenu(selectedManga) } else { - resp := mal.SetMangaStatus(manga.Id, statusInput) + resp := mal.SetMangaStatus(selectedManga.Id, statusInput) fmt.Println(resp.Status) fmt.Println(ui.CreateStatusUpdateConfirmationMessage(manga.Title, resp.Status)) } diff --git a/cmd/version.go b/cmd/version.go index cc40407..f5ca999 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" ) -var version string = "v1.4.1" +var version string = "v1.4.2" var versionCmd = &cobra.Command { Use: "version", |