Improved API privacy

This commit is contained in:
2019-09-07 20:09:55 +09:00
parent 4e6aa5eef6
commit cc1c394002
6 changed files with 25 additions and 1 deletions

View File

@ -38,6 +38,11 @@ type ConnectionAnalytics struct {
EffectiveType string `json:"effectiveType"`
}
// GetID returns the ID.
func (analytics *Analytics) GetID() string {
return analytics.UserID
}
// GetAnalytics returns the analytics for the given user ID.
func GetAnalytics(userID UserID) (*Analytics, error) {
obj, err := DB.Get("Analytics", userID)