type AuthenticatedHandler func(context.Context, http.ResponseWriter, *http.Request, *app.User) error
-type User struct {
- ID string
-}
-
func (hndl AuthenticatedHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
ctx := appengine.NewContext(r)
}
func setupHandler(w http.ResponseWriter, r *http.Request) {
- url := fitbit.AuthURL()
- http.Redirect(w, r, url, http.StatusTemporaryRedirect)
+ http.Redirect(w, r, fitbit.AuthURL(), http.StatusTemporaryRedirect)
}
func fitbitGrantHandler(ctx context.Context, w http.ResponseWriter, r *http.Request, u *app.User) error {