check email

This commit is contained in:
geek 2017-08-30 14:18:26 +09:00
parent 01ffc130b4
commit d9855bb220
3 changed files with 0 additions and 69 deletions

View File

@ -49,9 +49,6 @@ func main() {
s.Route("POST", "/account/signin", member.SignIn)
s.Route("POST", "/account/signup", member.SignUp)
s.Route("POST", "/account/modify", member.Modify)
s.Route("POST", "/account/read", member.SignUp)
s.Route("POST", "/account/pw_confirm", member.ConfirmPW)
s.Route("POST", "/account/forgot_password", member.ForgotPassword)
s.Route("GET", "/account/check_email", member.CheckEmail)

View File

@ -1,28 +0,0 @@
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

@ -1,38 +0,0 @@
package member
import (
"fmt"
"git.loafle.net/overflow/overflow_server_app/backend"
"git.loafle.net/overflow/overflow_server_app/server"
"github.com/valyala/fasthttp"
"encoding/json"
)
func Modify(sctx *server.ServerContext, ctx *fasthttp.RequestCtx) {
grpcPool := sctx.Value("grpc").(backend.Pool)
fmt.Fprintf(ctx, "avail: %d\n", grpcPool.Available())
c, err := grpcPool.Get()
if nil != err {
}
defer c.Close()
fmt.Fprintf(ctx, "avail: %d\n", grpcPool.Available())
m := &Member{}
m.Id = string(ctx.FormValue("id"))
m.Email = string(ctx.FormValue("email"))
m.Name = string(ctx.FormValue("name"))
m.CompanyName = string(ctx.FormValue("companyName"))
m.Phone = string(ctx.FormValue("phone"))
m.Pw = string(ctx.FormValue("pw"))
mm,_ := json.Marshal(m)
params := []string{string(mm), string(m.Pw)}
r, err := c.Exec("MemberService", "modify", params)
fmt.Fprintf(ctx, "Welcome!!!!: %s\n", r)
}