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

View File

@ -17,6 +17,7 @@ type UserApi struct {
} }
func (this *UserApi) Login(c *gin.Context) { func (this *UserApi) Login(c *gin.Context) {
if f5.IsTestEnv() {
accountAddress := "0x0cf08c8661f87cbf823128d37ba75814cbcdf08b" accountAddress := "0x0cf08c8661f87cbf823128d37ba75814cbcdf08b"
s := GetSessionMgr().AddSession(accountAddress, accountAddress) s := GetSessionMgr().AddSession(accountAddress, accountAddress)
c.JSON(http.StatusOK, gin.H{ c.JSON(http.StatusOK, gin.H{
@ -25,6 +26,7 @@ func (this *UserApi) Login(c *gin.Context) {
//"data": user, //"data": user,
"token": s.GetToken(), "token": s.GetToken(),
}) })
}
} }
func (this *UserApi) Info(c *gin.Context) { func (this *UserApi) Info(c *gin.Context) {