(state = {})
| 1980 | } |
| 1981 | |
| 1982 | function ensureLuckmailApiKey(state = {}) { |
| 1983 | const apiKey = String(state.luckmailApiKey || '').trim(); |
| 1984 | if (!apiKey) { |
| 1985 | throw new Error('LuckMail API Key 为空,请先在侧边栏填写。'); |
| 1986 | } |
| 1987 | return apiKey; |
| 1988 | } |
| 1989 | |
| 1990 | async function requestLuckmail(method, path, { baseUrl, apiKey, params, jsonData, timeout = 30000 } = {}) { |
| 1991 | const requestUrl = new URL(`${normalizeLuckmailBaseUrl(baseUrl)}${path}`); |
no outgoing calls
no test coverage detected