fixed verification code
This commit is contained in:
@@ -12,12 +12,14 @@ import (
|
||||
|
||||
type AccountNotification struct {
|
||||
messaging.Envelope
|
||||
accountRef bson.ObjectID
|
||||
accountRef bson.ObjectID
|
||||
verificationToken string
|
||||
}
|
||||
|
||||
func (acn *AccountNotification) Serialize() ([]byte, error) {
|
||||
var msg gmessaging.AccountCreatedEvent
|
||||
msg.AccountRef = acn.accountRef.Hex()
|
||||
msg.VerificationToken = acn.verificationToken
|
||||
data, err := proto.Marshal(&msg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -29,9 +31,10 @@ func NewAccountNotification(action nm.NotificationAction) model.NotificationEven
|
||||
return model.NewNotification(mservice.Accounts, action)
|
||||
}
|
||||
|
||||
func NewAccountImp(sender string, accountRef bson.ObjectID, action nm.NotificationAction) messaging.Envelope {
|
||||
func NewAccountImp(sender string, accountRef bson.ObjectID, action nm.NotificationAction, verificationToken string) messaging.Envelope {
|
||||
return &AccountNotification{
|
||||
Envelope: messaging.CreateEnvelope(sender, NewAccountNotification(action)),
|
||||
accountRef: accountRef,
|
||||
Envelope: messaging.CreateEnvelope(sender, NewAccountNotification(action)),
|
||||
accountRef: accountRef,
|
||||
verificationToken: verificationToken,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user