projects
/
kraftakt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
000f6f0
)
Package app: Add email address to User object.
author
Florian Forster
<ff@octo.it>
Wed, 10 Jan 2018 21:02:50 +0000
(22:02 +0100)
committer
Florian Forster
<ff@octo.it>
Wed, 10 Jan 2018 21:02:50 +0000
(22:02 +0100)
app/user.go
patch
|
blob
|
history
gfitsync.go
patch
|
blob
|
history
diff --git
a/app/user.go
b/app/user.go
index
86c033c
..
8465c2c
100644
(file)
--- a/
app/user.go
+++ b/
app/user.go
@@
-11,7
+11,8
@@
import (
)
type User struct {
)
type User struct {
- key *datastore.Key
+ Email string
+ key *datastore.Key
}
type dbUser struct {
}
type dbUser struct {
@@
-35,7
+36,8
@@
func NewUser(ctx context.Context, email string) (*User, error) {
}
return &User{
}
return &User{
- key: datastore.NewKey(ctx, "User", email, 0, nil),
+ Email: email,
+ key: datastore.NewKey(ctx, "User", email, 0, nil),
}, nil
}
}, nil
}
@@
-50,7
+52,8
@@
func UserByID(ctx context.Context, id string) (*User, error) {
}
return &User{
}
return &User{
- key: keys[0],
+ Email: keys[0].StringID(),
+ key: keys[0],
}, nil
}
}, nil
}
diff --git
a/gfitsync.go
b/gfitsync.go
index
0007395
..
898fb98
100644
(file)
--- a/
gfitsync.go
+++ b/
gfitsync.go
@@
-200,6
+200,6
@@
func handleNotification(ctx context.Context, s *fitbit.Subscription) error {
return err
}
return err
}
- log.Debugf(ctx, "ActivitySummary
(%q) = %+v", s.OwnerID
, summary)
+ log.Debugf(ctx, "ActivitySummary
for %s = %+v", u.Email
, summary)
return nil
}
return nil
}