From fff3dadabc321871e6819392efc605c6dffe2e69 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Tue, 15 Aug 2023 10:57:27 +0530 Subject: migrated from MAL2Go to mg package --- mal/delete.go | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'mal/delete.go') diff --git a/mal/delete.go b/mal/delete.go index e6cfd32..61acc94 100644 --- a/mal/delete.go +++ b/mal/delete.go @@ -19,28 +19,20 @@ along with this program. If not, see . package mal import ( + "vidhukant.com/mg" "fmt" - // "os" - a "github.com/MikunoNaka/MAL2Go/v4/anime" - m "github.com/MikunoNaka/MAL2Go/v4/manga" ) -func DeleteAnime(anime a.Anime) { - res, err := userAnimeClient.DeleteAnime(anime.Id) +func DeleteAnime(anime mg.Anime) { + err := MALClient.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, err := userMangaClient.DeleteManga(manga.Id) +func DeleteManga(manga mg.Manga) { + err := MALClient.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