add create base lead target for all account with type mail
This commit is contained in:
parent
b4d95db30c
commit
60790ff349
@ -105,6 +105,16 @@ func (s *Service) createAccount(ctx *fiber.Ctx) error {
|
||||
return ctx.Status(fiber.StatusInternalServerError).SendString(err.Error())
|
||||
}
|
||||
|
||||
_, err = s.dal.AccountRepo.PostLeadTarget(ctx.Context(), model.LeadTarget{
|
||||
AccountID: accountID,
|
||||
Target: email,
|
||||
Type: model.LeadTargetEmail,
|
||||
QuizID: 0,
|
||||
})
|
||||
if err != nil {
|
||||
return ctx.Status(fiber.StatusInternalServerError).SendString(err.Error())
|
||||
}
|
||||
|
||||
err = s.producer.ToMailNotify(ctx.Context(), brokers.Message{
|
||||
AccountID: accountID,
|
||||
Email: email,
|
||||
|
Loading…
Reference in New Issue
Block a user