LinsRuis.HW1 2 months ago
parent
commit
4182cc08ae
  1. 6
      webs/sys/routehb/user.go

6
webs/sys/routehb/user.go

@ -9,13 +9,14 @@ import (
"GoClouds/service"
"GoClouds/service/userService"
"fmt"
"strings"
"time"
hbtp "github.com/mgr9525/HyperByte-Transfer-Protocol"
gocloud "github.com/mgr9525/go-cloud"
ruisUtil "github.com/mgr9525/go-ruisutil"
"github.com/sirupsen/logrus"
"go.mongodb.org/mongo-driver/bson/primitive"
"strings"
"time"
)
type UserRPC struct{}
@ -101,6 +102,7 @@ func (UserRPC) Login(c *hbtp.Context, m *sysBean.LoginReq) {
ret.Xid = usr.Xid
ret.Name = usr.Name
ret.SetHash(usr.Pass)
gocloud.CacheSets(fmt.Sprintf("uinfo:%s", usr.Xid), nil)
c.ResJson(hbtp.ResStatusOk, ret)
}
func (UserRPC) Reg(c *hbtp.Context, m *sysBean.RegReq) {

Loading…
Cancel
Save