overflow_server_app/module/member/check_email.go
crusader 1639b86706 ing
2017-11-23 17:06:44 +09:00

28 lines
495 B
Go

package member
import (
"context"
"fmt"
"net/url"
"git.loafle.net/overflow/overflow_server_app/external/grpc"
"github.com/valyala/fasthttp"
)
func CheckEmail(ctx *fasthttp.RequestCtx) {
key := string(ctx.FormValue("key"))
params := []string{url.QueryEscape(key)}
gRPCCtx := context.Background()
r, err := grpc.Exec(gRPCCtx, "EmailAuthService.readByAuthKey", params)
if err != nil {
fmt.Fprintf(ctx, "Error!!!!: %s\n", err)
}
fmt.Fprintf(ctx, "Email Check!!!!: %s\n", r)
}