Add Email to send verification endpoints in user service (#277)

* Add Email to send verification endpoints in user service

* updates
This commit is contained in:
Asim Aslam
2021-11-17 16:44:42 +00:00
committed by GitHub
parent 4923f42da0
commit 54099a2df7
5 changed files with 310 additions and 139 deletions

View File

@@ -4,6 +4,7 @@ import (
"github.com/micro/micro/v3/service"
"github.com/micro/micro/v3/service/logger"
db "github.com/micro/services/db/proto"
otp "github.com/micro/services/otp/proto"
"github.com/micro/services/pkg/tracing"
"github.com/micro/services/user/handler"
proto "github.com/micro/services/user/proto"
@@ -15,9 +16,12 @@ func main() {
)
service.Init()
handl := handler.NewUser(db.NewDbService("db", service.Client()))
hd := handler.NewUser(
db.NewDbService("db", service.Client()),
otp.NewOtpService("otp", service.Client()),
)
proto.RegisterUserHandler(service.Server(), handl)
proto.RegisterUserHandler(service.Server(), hd)
traceCloser := tracing.SetupOpentracing("user")
defer traceCloser.Close()