Exemple #1
0
func SaveAboutUser(aboutResp *fb.Result, party string, context appengine.Context) {
	var log Log
	aboutResp.Decode(&log)

	var ageRange map[string]int
	var location map[string]string
	aboutResp.DecodeField("location", &location)
	aboutResp.DecodeField("age_range", &ageRange)

	log.AgeRange = ageRange["min"]
	log.Location = location["name"]
	log.Party = party

	_, err := datastore.Put(context,
		datastore.NewIncompleteKey(context, "log", nil),
		&log)
	check(err, context)
}