BillionMail gives you open-source MailServer, NewsLetter, Email Marketing — fully self-hosted, dev-friendly, and free from monthly fees. Join the discord: https://discord.gg/asfXzBUhZr
Add the "hasbrandinfo" confirmation field to the domain.
lotka149dbf615df
diff --git a/core/api/domains/v1/domains.go b/core/api/domains/v1/domains.goindex f21d9574..c971a444 100644--- a/core/api/domains/v1/domains.go+++ b/core/api/domains/v1/domains.go@@ -48,6 +48,7 @@ type Domain struct {Catchall string `json:"email" dc:"Cache all DNS records, used for domain verification"`Default int `json:"default" dc:"Default sender domain, 1-yes, 0-no"`Urls []string `json:"urls" dc:"Additional URLs associated with the domain"`+ HasBrandInfo int `json:"hasbrandinfo" dc:"Brand information : 1-exist, 0-not exist"`}type AddDomainReq struct {@@ -60,6 +61,7 @@ type AddDomainReq struct {RateLimit int `json:"rateLimit" v:"min:1" dc:"RateLimit" d:"12"`Catchall string `json:"email" v:"email" dc:"Catch all email address, used for domain verification"`Urls []string `json:"urls" dc:"Additional URLs associated with the domain"`+ HasBrandInfo int `json:"hasbrandinfo" dc:"Brand information : 1-exist, 0-not exist"`}type AddDomainRes struct {@@ -77,6 +79,7 @@ type UpdateDomainReq struct {Active int `json:"active" v:"required" dc:"Active" d:"1"`Catchall string `json:"email" v:"email" dc:"Catch all email address, used for domain verification"`Urls []string `json:"urls" dc:"Additional URLs associated with the domain"`+ HasBrandInfo int `json:"hasbrandinfo" dc:"Brand information : 1-exist, 0-not exist"`}type UpdateDomainRes struct {diff --git a/core/internal/controller/domains/domains_v1_add_domain.go b/core/internal/controller/domains/domains_v1_add_domain.goindex 6a0ae154..1a6a750a 100644--- a/core/internal/controller/domains/domains_v1_add_domain.go+++ b/core/internal/controller/domains/domains_v1_add_domain.go@@ -25,6 +25,7 @@ func (c *ControllerV1) AddDomain(ctx context.Context, req *v1.AddDomainReq) (resRateLimit: req.RateLimit,Catchall: req.Catchall,Urls: req.Urls,+ HasBrandInfo: req.HasBrandInfo,}if err = domains.Add(ctx, domain); err != nil {diff --git a/core/internal/controller/domains/domains_v1_update_domain.go b/core/internal/controller/domains/domains_v1_update_domain.goindex 0f9cd980..6d1e5d2e 100644--- a/core/internal/controller/domains/domains_v1_update_domain.go+++ b/core/internal/controller/domains/domains_v1_update_domain.go@@ -28,6 +28,7 @@ func (c *ControllerV1) UpdateDomain(ctx context.Context, req *v1.UpdateDomainReqActive: req.Active,Catchall: req.Catchall,Urls: req.Urls,+ HasBrandInfo: req.HasBrandInfo,}if err = domains.Update(ctx, domain); err != nil {diff --git a/core/internal/service/database_initialization/mail_serv.go b/core/internal/service/database_initialization/mail_serv.goindex c2112d17..f80ee7d1 100644--- a/core/internal/service/database_initialization/mail_serv.go+++ b/core/internal/service/database_initialization/mail_serv.go@@ -19,6 +19,7 @@ func init() {create_time INT NOT NULL default 0,active SMALLINT NOT NULL DEFAULT 1,urls TEXT[] NOT NULL DEFAULT '{}'::TEXT[],+ hasbrandinfo SMALLINT NOT NULL DEFAULT 0,PRIMARY KEY (domain))`,@@ -117,5 +118,6 @@ func init() {// domain_ = AddColumnIfNotExists("domain", "urls", "TEXT[]", "'{}'::TEXT[]", false)+ _ = AddColumnIfNotExists("domain", "hasbrandinfo", "SMALLINT", "0", false)})}