feat(api): migrate server and node data handling, update related structures and logic
This commit is contained in:
@@ -51,7 +51,7 @@ func (l *ResetPasswordLogic) ResetPassword(req *types.ResetPasswordRequest) (res
|
||||
Success: loginStatus,
|
||||
}
|
||||
content, _ := loginLog.Marshal()
|
||||
if err = l.svcCtx.LogModel.Insert(l.ctx, &log.SystemLog{
|
||||
if err := l.svcCtx.LogModel.Insert(l.ctx, &log.SystemLog{
|
||||
Id: 0,
|
||||
Type: log.TypeLogin.Uint8(),
|
||||
Date: time.Now().Format("2006-01-02"),
|
||||
|
||||
@@ -59,7 +59,7 @@ func (l *TelephoneLoginLogic) TelephoneLogin(req *types.TelephoneLoginRequest, r
|
||||
Success: loginStatus,
|
||||
}
|
||||
content, _ := loginLog.Marshal()
|
||||
if err = l.svcCtx.LogModel.Insert(l.ctx, &log.SystemLog{
|
||||
if err := l.svcCtx.LogModel.Insert(l.ctx, &log.SystemLog{
|
||||
Id: 0,
|
||||
Type: log.TypeLogin.Uint8(),
|
||||
Date: time.Now().Format("2006-01-02"),
|
||||
|
||||
@@ -110,7 +110,7 @@ func (l *TelephoneResetPasswordLogic) TelephoneResetPassword(req *types.Telephon
|
||||
Success: token != "",
|
||||
}
|
||||
content, _ := loginLog.Marshal()
|
||||
if err = l.svcCtx.LogModel.Insert(l.ctx, &log.SystemLog{
|
||||
if err := l.svcCtx.LogModel.Insert(l.ctx, &log.SystemLog{
|
||||
Id: 0,
|
||||
Type: log.TypeLogin.Uint8(),
|
||||
Date: time.Now().Format("2006-01-02"),
|
||||
|
||||
@@ -165,7 +165,7 @@ func (l *TelephoneUserRegisterLogic) TelephoneUserRegister(req *types.TelephoneR
|
||||
Success: token != "",
|
||||
}
|
||||
content, _ := loginLog.Marshal()
|
||||
if err = l.svcCtx.LogModel.Insert(l.ctx, &log.SystemLog{
|
||||
if err := l.svcCtx.LogModel.Insert(l.ctx, &log.SystemLog{
|
||||
Id: 0,
|
||||
Type: log.TypeLogin.Uint8(),
|
||||
Date: time.Now().Format("2006-01-02"),
|
||||
@@ -188,7 +188,7 @@ func (l *TelephoneUserRegisterLogic) TelephoneUserRegister(req *types.TelephoneR
|
||||
RegisterTime: time.Now().UnixMilli(),
|
||||
}
|
||||
content, _ = registerLog.Marshal()
|
||||
if err = l.svcCtx.LogModel.Insert(l.ctx, &log.SystemLog{
|
||||
if err := l.svcCtx.LogModel.Insert(l.ctx, &log.SystemLog{
|
||||
Type: log.TypeRegister.Uint8(),
|
||||
ObjectID: userInfo.Id,
|
||||
Date: time.Now().Format("2006-01-02"),
|
||||
|
||||
@@ -49,7 +49,7 @@ func (l *UserLoginLogic) UserLogin(req *types.UserLoginRequest) (resp *types.Log
|
||||
Success: loginStatus,
|
||||
}
|
||||
content, _ := loginLog.Marshal()
|
||||
if err = l.svcCtx.LogModel.Insert(l.ctx, &log.SystemLog{
|
||||
if err := l.svcCtx.LogModel.Insert(l.ctx, &log.SystemLog{
|
||||
Type: log.TypeLogin.Uint8(),
|
||||
Date: time.Now().Format("2006-01-02"),
|
||||
ObjectID: userInfo.Id,
|
||||
|
||||
@@ -153,7 +153,7 @@ func (l *UserRegisterLogic) UserRegister(req *types.UserRegisterRequest) (resp *
|
||||
Success: loginStatus,
|
||||
}
|
||||
content, _ := loginLog.Marshal()
|
||||
if err = l.svcCtx.LogModel.Insert(l.ctx, &log.SystemLog{
|
||||
if err := l.svcCtx.LogModel.Insert(l.ctx, &log.SystemLog{
|
||||
Id: 0,
|
||||
Type: log.TypeLogin.Uint8(),
|
||||
Date: time.Now().Format("2006-01-02"),
|
||||
|
||||
Reference in New Issue
Block a user