From: Florian Forster Date: Wed, 31 Jan 2018 09:09:38 +0000 (+0100) Subject: fitbitDisconnectHandler(): Add call to c.DeleteToken(). X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=9cd8936ef5691454d4370766f78bc1e2ce7f9e23;p=kraftakt.git fitbitDisconnectHandler(): Add call to c.DeleteToken(). --- diff --git a/kraftakt.go b/kraftakt.go index 4c69459..4700104 100644 --- a/kraftakt.go +++ b/kraftakt.go @@ -178,8 +178,11 @@ func fitbitDisconnectHandler(ctx context.Context, w http.ResponseWriter, r *http } if err := c.UnsubscribeAll(ctx); err != nil { - log.Errorf(ctx, "UnsubscribeAll() = %v", err) - return fmt.Errorf("deleting all subscriptions failed") + return fmt.Errorf("UnsubscribeAll() = %v", err) + } + + if err := c.DeleteToken(ctx); err != nil { + return err } redirectURL := r.URL