feat: Initialize backend API server with S2A proxy, mail service management, team processing, and add frontend email configuration page.
This commit is contained in:
@@ -258,6 +258,7 @@ func processSingleTeam(idx int, req TeamProcessRequest) TeamProcessResult {
|
||||
if owner.AccountID != "" {
|
||||
// 直接使用数据库中存储的 account_id
|
||||
teamID = owner.AccountID
|
||||
inviter.SetAccountID(teamID) // 必须设置到 inviter 中
|
||||
logger.Info(fmt.Sprintf("%s 使用已存储的 Team ID: %s", logPrefix, teamID), owner.Email, "team")
|
||||
} else {
|
||||
// 如果没有存储,才请求 API 获取
|
||||
|
||||
@@ -54,6 +54,11 @@ func NewWithProxy(accessToken, proxy string) *TeamInviter {
|
||||
}
|
||||
}
|
||||
|
||||
// SetAccountID 手动设置 account_id(当已有存储值时使用)
|
||||
func (t *TeamInviter) SetAccountID(accountID string) {
|
||||
t.accountID = accountID
|
||||
}
|
||||
|
||||
// GetAccountID 获取 Team 的 account_id (workspace_id)
|
||||
func (t *TeamInviter) GetAccountID() (string, error) {
|
||||
req, _ := http.NewRequest("GET", "https://chatgpt.com/backend-api/accounts/check/v4-2023-04-27", nil)
|
||||
|
||||
Reference in New Issue
Block a user