MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / uploadToCodex2api

Function uploadToCodex2api

static/js/accounts.js:2161–2178  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

2159}
2160
2161async function uploadToCodex2api(id) {
2162 const choice = await selectCodex2apiService();
2163 if (choice === null) return;
2164 try {
2165 toast.info('正在上传到 Codex2API...');
2166 const payload = {};
2167 if (choice.service_id != null) payload.service_id = choice.service_id;
2168 const result = await api.post(`/accounts/${id}/upload-codex2api`, payload);
2169 if (result.success) {
2170 toast.success('上传成功');
2171 loadAccounts();
2172 } else {
2173 toast.error('上传失败: ' + (result.error || result.message || '未知错误'));
2174 }
2175 } catch (e) {
2176 toast.error('上传失败: ' + e.message);
2177 }
2178}
2179
2180// ============== Sub2API 上传 ==============
2181

Callers 1

uploadAccountFunction · 0.85

Calls 6

selectCodex2apiServiceFunction · 0.85
infoMethod · 0.80
successMethod · 0.80
errorMethod · 0.80
loadAccountsFunction · 0.70
postMethod · 0.45

Tested by

no test coverage detected