auth
177:5d52b9d83184 Browse Files
Add notes about model events. We need to sensibly trigger events about models, so I left some basic notes about triggering an event when a Profile is created.
1.1 --- a/profile.go Mon Jun 29 23:58:05 2015 -0400 1.2 +++ b/profile.go Mon Jul 13 23:49:25 2015 -0400 1.3 @@ -632,7 +632,9 @@ 1.4 Profiles: []Profile{profile}, 1.5 } 1.6 encode(w, r, http.StatusCreated, resp) 1.7 - go context.SendLoginVerification(login) 1.8 + go context.SendLoginVerification(login) // this should key off that model event, instead 1.9 + //BUG(paddy): Need to trigger a ModelEvent saying the profile was created 1.10 + // go context.SendModelEvent(profile, events.ActionCreated) 1.11 } 1.12 1.13 func UpdateProfileHandler(w http.ResponseWriter, r *http.Request, context Context) {