From: Florian Forster Date: Tue, 30 Jan 2018 08:40:36 +0000 (+0100) Subject: Package gfit: Implement Client.DeleteToken(). X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=b5e08b65d712519fde12a8406b3ec7e54ba07c9e;p=kraftakt.git Package gfit: Implement Client.DeleteToken(). --- diff --git a/gfit/gfit.go b/gfit/gfit.go index df7bd2c..610ee5c 100644 --- a/gfit/gfit.go +++ b/gfit/gfit.go @@ -70,6 +70,7 @@ func ParseToken(ctx context.Context, r *http.Request, u *app.User) error { type Client struct { *fitness.Service + appUser *app.User } func NewClient(ctx context.Context, u *app.User) (*Client, error) { @@ -85,9 +86,14 @@ func NewClient(ctx context.Context, u *app.User) (*Client, error) { return &Client{ Service: service, + appUser: u, }, nil } +func (c *Client) DeleteToken(ctx context.Context) error { + return c.appUser.DeleteToken(ctx, "Google") +} + func DataStreamID(dataSource *fitness.DataSource) string { fields := []string{ dataSource.Type,