ft/adds backend url env
This commit is contained in:
parent
eb6a161fe4
commit
92d9985607
@ -8,6 +8,7 @@ ACCESS_TOKEN_DURATION=15m
|
|||||||
MIGRATION_URL=file://db/migration
|
MIGRATION_URL=file://db/migration
|
||||||
MIGRATION_RETRIES=5
|
MIGRATION_RETRIES=5
|
||||||
SWAGGER=true
|
SWAGGER=true
|
||||||
|
URL=https://df.itsscb.de
|
||||||
REFRESH_TOKEN_DURATION=24h
|
REFRESH_TOKEN_DURATION=24h
|
||||||
TOKEN_PRIVATEKEY_HEX=099c0b96725b99e95719c92aec580809ac58fc14be2105ed2656f1f6c464593d8cacd6c7bed924b9cf207ab3cff1c59be4e5865260c4dafa29699244bd4ea2de
|
TOKEN_PRIVATEKEY_HEX=099c0b96725b99e95719c92aec580809ac58fc14be2105ed2656f1f6c464593d8cacd6c7bed924b9cf207ab3cff1c59be4e5865260c4dafa29699244bd4ea2de
|
||||||
SMTP_ADDRESS=smtp.gmail.com:587
|
SMTP_ADDRESS=smtp.gmail.com:587
|
||||||
|
@ -32,7 +32,7 @@ func (server *Server) CreateAccount(ctx context.Context, req *pb.CreateAccountRe
|
|||||||
Email: req.GetEmail(),
|
Email: req.GetEmail(),
|
||||||
},
|
},
|
||||||
AfterCreate: func(a db.Account) error {
|
AfterCreate: func(a db.Account) error {
|
||||||
return server.mailSender.SendEmail("Verify your E-Mail Address", fmt.Sprintf("Hello %s,</br></br>please verify your E-Mail Addres by clicking on the following link:</br><a href=\"http://localhost:8080/v1/verify_email/%d/%s\">Verification Link</a></br></br></br>Your Team of DF", req.GetEmail(), a.ID, a.SecretKey.String), []string{req.GetEmail()}, nil, nil, nil)
|
return server.mailSender.SendEmail("Verify your E-Mail Address", fmt.Sprintf("Hello %s,</br></br>please verify your E-Mail Addres by clicking on the following link:</br><a href=\"%s/v1/verify_email/%d/%s\">Verification Link</a></br></br></br>Your Team of DF", req.GetEmail(), server.config.Url, a.ID, a.SecretKey.String), []string{req.GetEmail()}, nil, nil, nil)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ func (server *Server) ResendVerification(ctx context.Context, req *pb.ResendVeri
|
|||||||
ID: req.GetAccountId(),
|
ID: req.GetAccountId(),
|
||||||
},
|
},
|
||||||
AfterCreate: func(a db.Account) error {
|
AfterCreate: func(a db.Account) error {
|
||||||
return server.mailSender.SendEmail("Verify your E-Mail Address", fmt.Sprintf("Hello %s,</br></br>please verify your E-Mail Addres by clicking on the following link:</br><a href=\"http://localhost:8080/v1/verify_email/%d/%s\">Verification Link</a></br></br></br>Your Team of DF", account.Email, a.ID, a.SecretKey.String), []string{account.Email}, nil, nil, nil)
|
return server.mailSender.SendEmail("Verify your E-Mail Address", fmt.Sprintf("Hello %s,</br></br>please verify your E-Mail Addres by clicking on the following link:</br><a href=\"%s/v1/verify_email/%d/%s\">Verification Link</a></br></br></br>Your Team of DF", account.Email, server.config.Url, a.ID, a.SecretKey.String), []string{account.Email}, nil, nil, nil)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ func (server *Server) UpdateAccount(ctx context.Context, req *pb.UpdateAccountRe
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
arg.AfterUpdate = func(a db.Account) error {
|
arg.AfterUpdate = func(a db.Account) error {
|
||||||
return server.mailSender.SendEmail("Verify your E-Mail Address", fmt.Sprintf("Hello %s,</br></br>please verify your E-Mail Addres by clicking on the following link:</br><a href=\"http://localhost:8080/v1/verify_email/%d/%s\">Verification Link</a></br></br></br>Your Team of DF", req.GetEmail(), a.ID, a.SecretKey.String), []string{req.GetEmail()}, nil, nil, nil)
|
return server.mailSender.SendEmail("Verify your E-Mail Address", fmt.Sprintf("Hello %s,</br></br>please verify your E-Mail Addres by clicking on the following link:</br><a href=\"%s/v1/verify_email/%d/%s\">Verification Link</a></br></br></br>Your Team of DF", req.GetEmail(), server.config.Url, a.ID, a.SecretKey.String), []string{req.GetEmail()}, nil, nil, nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ type Config struct {
|
|||||||
TokenPrivateKeyHex string `mapstructure:"TOKEN_PRIVATEKEY_HEX"`
|
TokenPrivateKeyHex string `mapstructure:"TOKEN_PRIVATEKEY_HEX"`
|
||||||
MigrationURL string `mapstructure:"MIGRATION_URL"`
|
MigrationURL string `mapstructure:"MIGRATION_URL"`
|
||||||
Swagger bool `mapstructure:"SWAGGER"`
|
Swagger bool `mapstructure:"SWAGGER"`
|
||||||
|
Url string `mapstructure:"URL"`
|
||||||
SMTPAddress string `mapstructure:"SMTP_ADDRESS"`
|
SMTPAddress string `mapstructure:"SMTP_ADDRESS"`
|
||||||
SMTPPassword string `mapstructure:"SMTP_PASSWORD"`
|
SMTPPassword string `mapstructure:"SMTP_PASSWORD"`
|
||||||
SMTPMail string `mapstructure:"SMTP_MAIL"`
|
SMTPMail string `mapstructure:"SMTP_MAIL"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user