From 1395d849470cc564d593bd2074a69f012e4f70ce Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Wed, 29 Jun 2022 23:46:53 +0530 Subject: migrated from MAL2Go v1 to v2 --- mal/delete.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'mal/delete.go') diff --git a/mal/delete.go b/mal/delete.go index 27ffbe6..863e9f3 100644 --- a/mal/delete.go +++ b/mal/delete.go @@ -21,19 +21,25 @@ package mal import ( "fmt" // "os" - a "github.com/MikunoNaka/MAL2Go/anime" - m "github.com/MikunoNaka/MAL2Go/manga" + a "github.com/MikunoNaka/MAL2Go/v2/anime" + m "github.com/MikunoNaka/MAL2Go/v2/manga" ) func DeleteAnime(anime a.Anime) { - res := userAnimeClient.DeleteAnime(anime.Id) + res, err := userAnimeClient.DeleteAnime(anime.Id) + if err != nil { + fmt.Println("Error While Deleting " + anime.Title + ":", err) + } if res != "200" { fmt.Println("Error: MyAnimeList Returned " + res + " while deleting " + anime.Title) } } func DeleteManga(manga m.Manga) { - res := userMangaClient.DeleteManga(manga.Id) + res, err := userMangaClient.DeleteManga(manga.Id) + if err != nil { + fmt.Println("Error While Deleting " + manga.Title + ":", err) + } if res != "200" { fmt.Println("Error: MyAnimeList Returned " + res + " while deleting " + manga.Title) } -- cgit v1.2.3