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, "<html><body><h1>Fitbit to Google Fit sync</h1>")
+
+ fmt.Fprintf(w, "<p>Hello %s</p>\n", u.Email)
+ fmt.Fprint(w, "<p>Fitbit: ")
+ if haveToken {
+ fmt.Fprint(w, `<strong style="color: DarkGreen;">Authorized</strong>`)
+ } else {
+ fmt.Fprint(w, `<strong style="color: DarkRed;">Not authorized</strong> (<a href="/setup">Authorize</a>)`)
+ }
+ fmt.Fprintln(w, "</p>")
+ fmt.Fprintln(w, "</body></html>")
// TODO(octo): print summary to user
return nil