Browse Source

//静默执行
种fastgpt的cookie静默执行

lichangdong 1 week ago
parent
commit
68e6feb9b6
1 changed files with 5 additions and 4 deletions
  1. 5 4
      internal/logic/auth/login_logic.go

+ 5 - 4
internal/logic/auth/login_logic.go

@@ -82,10 +82,11 @@ func (l *LoginLogic) Login(req *types.LoginReq) (resp *types.LoginResp, err erro
 	//set_cookie.NewFastGpt(l.svcCtx, fastgptLogic)
 	fastgptLogic := fastgpt.NewSetTokenLogic(l.ctx, l.svcCtx, l.rw)
 	//userId := *user.Id
-	_, err = fastgptLogic.SetTokenByUserId(*user.Id)
-	if err != nil {
-		return nil, err
-	}
+	//静默执行
+	_, _ = fastgptLogic.SetTokenByUserId(*user.Id)
+	//if err != nil {
+	//	return nil, err
+	//}
 	resp = &types.LoginResp{
 		BaseDataInfo: types.BaseDataInfo{Msg: errormsg.Success},
 		Data: types.LoginInfo{