check email

This commit is contained in:
geek
2017-08-30 12:21:59 +09:00
parent bff1fdc9e7
commit cf7fc2de04
2 changed files with 16 additions and 6 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/valyala/fasthttp"
"git.loafle.net/overflow/overflow_server_app/backend"
"net/url"
)
func CheckEmail(sctx *server.ServerContext, ctx *fasthttp.RequestCtx) {
@@ -21,10 +22,16 @@ func CheckEmail(sctx *server.ServerContext, ctx *fasthttp.RequestCtx) {
fmt.Fprintf(ctx, "avail: %d\n", grpcPool.Available())
signinId := string(ctx.FormValue("signinId"))
params := []string{signinId}
key := string(ctx.FormValue("key"))
params := []string{url.QueryEscape(key)}
r, err := c.Exec("EmailAuthService", "readByAuthKey", params)
if err != nil {
fmt.Fprintf(ctx, "Error!!!!: %s\n", err)
}
r, err := c.Exec("MemberService", "read", params)
fmt.Fprintf(ctx, "Welcome!!!!: %s \n", r)
}