aboutsummaryrefslogtreecommitdiff
path: root/user/anime/request_handler.go
diff options
context:
space:
mode:
Diffstat (limited to 'user/anime/request_handler.go')
-rw-r--r--user/anime/request_handler.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/user/anime/request_handler.go b/user/anime/request_handler.go
index f424c29..2007e56 100644
--- a/user/anime/request_handler.go
+++ b/user/anime/request_handler.go
@@ -20,6 +20,7 @@ import (
"io/ioutil"
"log"
"net/http"
+ "strconv"
)
// Handles HTTP request with your OAuth token as a Header
@@ -44,5 +45,10 @@ func (c AnimeListClient) requestHandler(endpoint, method string) string {
log.Fatal(err)
}
+ // for DeleteAnime, its endpoint returns null data
+ if method == "DELETE" {
+ return strconv.Itoa(res.StatusCode)
+ }
+
return string(body)
}