This commit is contained in:
geek 2017-08-24 17:37:08 +09:00
parent a7ea0ee3c3
commit 6b891496b1
3 changed files with 64 additions and 4 deletions

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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)
}