aboutsummaryrefslogtreecommitdiff
path: root/cmd/status.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-06-30 21:36:56 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-06-30 21:36:56 +0530
commite96531d4f83129d9ded98d3dbb76eeef6fb679e9 (patch)
treebeaab95c39f3187eb434319c1459b9b2d216e16a /cmd/status.go
parent05f7943ee7267e305d40be8afc2e404421ee5742 (diff)
Passing in selectedManga instead of manga to ui.MangaStatusMenu to properly display current status
Diffstat (limited to 'cmd/status.go')
-rw-r--r--cmd/status.go8
1 files changed, 4 insertions, 4 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))
}