aboutsummaryrefslogtreecommitdiff
path: root/mal
diff options
context:
space:
mode:
Diffstat (limited to 'mal')
-rw-r--r--mal/mal.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/mal/mal.go b/mal/mal.go
index cb9665e..77940df 100644
--- a/mal/mal.go
+++ b/mal/mal.go
@@ -28,6 +28,7 @@ import (
)
var (
+ Secret string
animeClient a.Client
mangaClient m.Client
userClient u.Client
@@ -40,8 +41,10 @@ var (
// init() would kill the program prematurely on `macli login` command
func Init() {
- secret := auth.GetToken()
- tk := "Bearer " + secret
+ if Secret == "" {
+ Secret = auth.GetToken()
+ }
+ tk := "Bearer " + Secret
// initialise MAL2Go Client(s)
animeClient.AuthToken = tk