This commit is contained in:
aozhiwei 2024-08-13 11:12:50 +08:00
parent 85ccf72de9
commit 189252a83a

View File

@ -17,14 +17,16 @@ type UserApi struct {
}
func (this *UserApi) Login(c *gin.Context) {
accountAddress := "0x0cf08c8661f87cbf823128d37ba75814cbcdf08b"
s := GetSessionMgr().AddSession(accountAddress, accountAddress)
c.JSON(http.StatusOK, gin.H{
"code": 0,
"message": "登录成功",
//"data": user,
"token": s.GetToken(),
})
if f5.IsTestEnv() {
accountAddress := "0x0cf08c8661f87cbf823128d37ba75814cbcdf08b"
s := GetSessionMgr().AddSession(accountAddress, accountAddress)
c.JSON(http.StatusOK, gin.H{
"code": 0,
"message": "登录成功",
//"data": user,
"token": s.GetToken(),
})
}
}
func (this *UserApi) Info(c *gin.Context) {