fixes 1606 emit OrgCreated event when new org created.

This commit is contained in:
Anthony Woods 2015-03-17 23:07:08 +08:00
parent 2a1434ce49
commit 068ccf1c0f

View File

@ -55,7 +55,11 @@ func getOrgIdForNewUser(userEmail string, sess *session) (int64, error) {
if _, err := sess.Insert(&org); err != nil {
return 0, err
}
sess.publishAfterCommit(&events.OrgCreated{
Timestamp: org.Created,
Id: org.Id,
Name: org.Name,
})
return org.Id, nil
}