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

Function refreshToken

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

Source from the content-addressed store, hash-verified

1057
1058// 刷新单个账号Token
1059async function refreshToken(id) {
1060 try {
1061 toast.info('正在刷新Token...');
1062 const result = await api.post(`/accounts/${id}/refresh`, {}, {
1063 timeoutMs: 60000,
1064 retry: 0,
1065 });
1066
1067 if (result.success) {
1068 toast.success('Token刷新成功');
1069 loadAccounts();
1070 } else {
1071 toast.error('刷新失败: ' + (result.error || '未知错误'));
1072 }
1073 } catch (error) {
1074 toast.error('刷新失败: ' + error.message);
1075 }
1076}
1077
1078async function validateToken(id) {
1079 try {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected