mirror of
https://github.com/cnlimiter/codex-register.git
synced 2026-06-10 01:50:31 +08:00
Merge branch 'fix1' into feat/auto-disable-failed-proxies
This commit is contained in:
@@ -678,16 +678,16 @@ async function handleOutlookBatchImport() {
|
||||
|
||||
lines.forEach((line, index) => {
|
||||
const parts = line.split('----').map(p => p.trim());
|
||||
if (parts.length < 2) {
|
||||
errors.push(`第 ${index + 1} 行格式错误`);
|
||||
if (parts.length < 4) {
|
||||
errors.push(`第 ${index + 1} 行格式错误,必须为 邮箱----密码----client_id----refresh_token`);
|
||||
return;
|
||||
}
|
||||
|
||||
const account = {
|
||||
email: parts[0],
|
||||
password: parts[1],
|
||||
client_id: parts[2] || null,
|
||||
refresh_token: parts[3] || null,
|
||||
client_id: parts[2],
|
||||
refresh_token: parts[3],
|
||||
enabled: enabled,
|
||||
priority: priority
|
||||
};
|
||||
@@ -697,6 +697,11 @@ async function handleOutlookBatchImport() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!account.client_id || !account.refresh_token) {
|
||||
errors.push(`第 ${index + 1} 行 client_id 或 refresh_token 不能为空`);
|
||||
return;
|
||||
}
|
||||
|
||||
accounts.push(account);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user