feat: Implement ChatGPT account registration flow and establish core backend API infrastructure with logging utilities.
This commit is contained in:
@@ -83,9 +83,9 @@ func HandleUploadValidate(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 并发验证账号并获取 account_id(只保留 team 账号)
|
||||
logger.Info(fmt.Sprintf("开始验证账号: 共 %d 个,只导入 plan 为 team 的账号", len(owners)), "", "upload")
|
||||
logger.Status(fmt.Sprintf("验证账号中: 共 %d 个,只导入 plan 为 team 的账号", len(owners)), "", "upload")
|
||||
validOwners, teamCount, nonTeamCount, failCount := validateAndFetchAccountIDs(owners, 20)
|
||||
logger.Info(fmt.Sprintf("验证完成: team=%d, 非team=%d, 失败=%d", teamCount, nonTeamCount, failCount), "", "upload")
|
||||
logger.Success(fmt.Sprintf("验证完成: team=%d, 非team=%d, 失败=%d", teamCount, nonTeamCount, failCount), "", "upload")
|
||||
|
||||
if len(validOwners) == 0 {
|
||||
Error(w, http.StatusBadRequest, fmt.Sprintf("没有有效的 team 账号(共 %d 个,非team: %d,失败: %d)", len(owners), nonTeamCount, failCount))
|
||||
@@ -141,7 +141,7 @@ func HandleRefetchAccountIDs(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
logger.Info(fmt.Sprintf("开始重新获取 account_id: 共 %d 个", len(owners)), "", "upload")
|
||||
logger.Status(fmt.Sprintf("重新获取 account_id 中: 共 %d 个", len(owners)), "", "upload")
|
||||
|
||||
// 并发获取 account_id
|
||||
var wg sync.WaitGroup
|
||||
|
||||
Reference in New Issue
Block a user