30 lines
576 B
Go
30 lines
576 B
Go
package member
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"git.loafle.net/overflow/overflow_server_app/backend"
|
|
|
|
"git.loafle.net/overflow/overflow_server_app/server"
|
|
|
|
"github.com/valyala/fasthttp"
|
|
)
|
|
|
|
func SignIn(sctx *server.ServerContext, ctx *fasthttp.RequestCtx) {
|
|
grpcPool := sctx.Value("grpc").(backend.Pool)
|
|
c, err := grpcPool.Get()
|
|
if nil != err {
|
|
|
|
}
|
|
|
|
signinId := string(ctx.FormValue("signinId"))
|
|
signinPw := string(ctx.FormValue("signinPw"))
|
|
|
|
params := []string{signinId, signinPw}
|
|
|
|
r, err := c.Exec("MemberService", "signin", params)
|
|
|
|
fmt.Fprintf(ctx, "Welcome!!!!: %s\n", r)
|
|
|
|
}
|