feat: Initialize backend API server with S2A proxy, mail service management, team processing, and add frontend email configuration page.

This commit is contained in:
2026-01-30 15:14:01 +08:00
parent 95ff84d15e
commit 1fd984e1ab
4 changed files with 86 additions and 4 deletions

View File

@@ -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 获取

View File

@@ -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)