Commit 6a09a7c3 by Anthony Woods

fixes #1606 emit OrgCreated event when new org created.

parent 2a1434ce
...@@ -55,7 +55,11 @@ func getOrgIdForNewUser(userEmail string, sess *session) (int64, error) { ...@@ -55,7 +55,11 @@ func getOrgIdForNewUser(userEmail string, sess *session) (int64, error) {
if _, err := sess.Insert(&org); err != nil { if _, err := sess.Insert(&org); err != nil {
return 0, err return 0, err
} }
sess.publishAfterCommit(&events.OrgCreated{
Timestamp: org.Created,
Id: org.Id,
Name: org.Name,
})
return org.Id, nil return org.Id, nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment