added logout functions
This commit is contained in:
@ -256,3 +256,18 @@ func (a *App) GetMyAnimeListLoggedInUser() MyAnimeListUser {
|
||||
|
||||
return user
|
||||
}
|
||||
|
||||
func (a *App) LogoutMyAnimeList() string {
|
||||
if (MyAnimeListJWT{} != myAnimeListJwt) {
|
||||
err := myAnimeListRing.Remove("MyAnimeListTokenType")
|
||||
err = myAnimeListRing.Remove("MyAnimeListExpiresIn")
|
||||
err = myAnimeListRing.Remove("MyAnimeListAccessToken")
|
||||
err = myAnimeListRing.Remove("MyAnimeListRefreshToken")
|
||||
|
||||
if err != nil {
|
||||
fmt.Println("MAL Logout Failed", err)
|
||||
}
|
||||
}
|
||||
|
||||
return "MAL Logged Out Successfully"
|
||||
}
|
||||
|
Reference in New Issue
Block a user