MCPcopy Create free account
hub / github.com/su-kaka/gcli2api / fetchUserEmail

Function fetchUserEmail

front/common.js:1564–1582  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

1562}
1563
1564async function fetchUserEmail(filename) {
1565 try {
1566 showStatus('正在获取用户邮箱...', 'info');
1567 const response = await fetch(`./creds/fetch-email/${encodeURIComponent(filename)}`, {
1568 method: 'POST',
1569 headers: getAuthHeaders()
1570 });
1571 const data = await response.json();
1572 if (response.ok && data.user_email) {
1573 showStatus(`成功获取邮箱: ${data.user_email}`, 'success');
1574 // 直接更新卡片中的邮箱显示,不刷新整个列表
1575 updateEmailDisplay(filename, data.user_email, 'normal');
1576 } else {
1577 showStatus(data.message || '无法获取用户邮箱', 'error');
1578 }
1579 } catch (error) {
1580 showStatus(`获取邮箱失败: ${error.message}`, 'error');
1581 }
1582}
1583
1584async function fetchAntigravityUserEmail(filename) {
1585 try {

Callers

nothing calls this directly

Calls 3

showStatusFunction · 0.85
getAuthHeadersFunction · 0.85
updateEmailDisplayFunction · 0.85

Tested by

no test coverage detected