From: Florian Forster Date: Wed, 10 Jan 2018 13:53:14 +0000 (+0100) Subject: Improve user visible status. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=63c0e25212c8fcd3da763b8f58cd13fc52169f31;p=kraftakt.git Improve user visible status. --- diff --git a/gfitsync.go b/gfitsync.go index 614d513..56cb353 100644 --- a/gfitsync.go +++ b/gfitsync.go @@ -115,7 +115,18 @@ func indexHandler(ctx context.Context, w http.ResponseWriter, r *http.Request, u haveToken = true } - fmt.Fprintf(w, "u = %v, tok = %v, haveToken = %v\n", u, tok, haveToken) + // fmt.Fprintf(w, "u = %v, tok = %v, haveToken = %v\n", u, tok, haveToken) + fmt.Fprintln(w, "

Fitbit to Google Fit sync

") + + fmt.Fprintf(w, "

Hello %s

\n", u.Email) + fmt.Fprint(w, "

Fitbit: ") + if haveToken { + fmt.Fprint(w, `Authorized`) + } else { + fmt.Fprint(w, `Not authorized (Authorize)`) + } + fmt.Fprintln(w, "

") + fmt.Fprintln(w, "") // TODO(octo): print summary to user return nil