aboutsummaryrefslogtreecommitdiff
path: root/mal/delete.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2023-08-15 10:57:27 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2023-08-15 10:57:27 +0530
commitfff3dadabc321871e6819392efc605c6dffe2e69 (patch)
tree25aceed23b73b2ad975a06d73fad091d0886a2a6 /mal/delete.go
parenta44d6eb2fdddc75983c735e1a0fa744014db9593 (diff)
migrated from MAL2Go to mg package
Diffstat (limited to 'mal/delete.go')
-rw-r--r--mal/delete.go18
1 files changed, 5 insertions, 13 deletions
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 <http://www.gnu.org/licenses/>.
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)
- }
}