diff --git a/module/member/check_email.go b/module/member/check_email.go index c0f9c19..9683a0f 100644 --- a/module/member/check_email.go +++ b/module/member/check_email.go @@ -6,11 +6,25 @@ import ( "git.loafle.net/overflow/overflow_server_app/server" "github.com/valyala/fasthttp" + "git.loafle.net/overflow/overflow_server_app/backend" ) func CheckEmail(sctx *server.ServerContext, ctx *fasthttp.RequestCtx) { - msg := sctx.Value("key1") + //msg := sctx.Value("key1") - fmt.Fprintf(ctx, "Welcome!!!!: %s \n", msg) + grpcPool := sctx.Value("grpc").(backend.Pool) + c, err := grpcPool.Get() + if nil != err { + } + defer c.Close() + + fmt.Fprintf(ctx, "avail: %d\n", grpcPool.Available()) + + signinId := string(ctx.FormValue("signinId")) + params := []string{signinId} + + r, err := c.Exec("MemberService", "read", params) + + fmt.Fprintf(ctx, "Welcome!!!!: %s \n", r) } diff --git a/module/member/confirm_pw.go b/module/member/confirm_pw.go new file mode 100644 index 0000000..f5dd5c3 --- /dev/null +++ b/module/member/confirm_pw.go @@ -0,0 +1,28 @@ +package member + +import ( + "github.com/valyala/fasthttp" + "git.loafle.net/overflow/overflow_server_app/server" + "git.loafle.net/overflow/overflow_server_app/backend" + "fmt" +) + +func ConfirmPW(sctx *server.ServerContext, ctx *fasthttp.RequestCtx) { + grpcPool := sctx.Value("grpc").(backend.Pool) + c, err := grpcPool.Get() + if nil != err { + + } + defer c.Close() + + fmt.Fprintf(ctx, "avail: %d\n", grpcPool.Available()) + + signinId := string(ctx.FormValue("signinId")) + signinPw := string(ctx.FormValue("signinPw")) + + params := []string{signinId, signinPw} + + r, err := c.Exec("MemberService", "confirmPw", params) + + fmt.Fprintf(ctx, "Confirm PW !!!!: %s\n", r) +} \ No newline at end of file diff --git a/module/member/forgot_password.go b/module/member/forgot_password.go index 72ef8a7..a613bc4 100644 --- a/module/member/forgot_password.go +++ b/module/member/forgot_password.go @@ -6,11 +6,29 @@ import ( "git.loafle.net/overflow/overflow_server_app/server" "github.com/valyala/fasthttp" + "git.loafle.net/overflow/overflow_server_app/backend" ) func ForgotPassword(sctx *server.ServerContext, ctx *fasthttp.RequestCtx) { - msg := sctx.Value("key1") + //msg := sctx.Value("key1") + // + //fmt.Fprintf(ctx, "Welcome!!!!: %s \n", msg) - fmt.Fprintf(ctx, "Welcome!!!!: %s \n", msg) + grpcPool := sctx.Value("grpc").(backend.Pool) + c, err := grpcPool.Get() + if nil != err { + } + defer c.Close() + + fmt.Fprintf(ctx, "avail: %d\n", grpcPool.Available()) + + signinId := string(ctx.FormValue("signinId")) + signinPw := string(ctx.FormValue("signinPw")) + + params := []string{signinId, signinPw} + + r, err := c.Exec("MemberService", "forgotPassword", params) + + fmt.Fprintf(ctx, "Password Change!!!!: %s\n", r) }