We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 321af19 + 676b188 commit 421374dCopy full SHA for 421374d
1 file changed
_worker.js
@@ -127,15 +127,11 @@ export default {
127
if (newConfig.Email && newConfig.GlobalAPIKey) {
128
CF_JSON.Email = newConfig.Email;
129
CF_JSON.GlobalAPIKey = newConfig.GlobalAPIKey;
130
- CF_JSON.AccountID = null;
131
- CF_JSON.APIToken = null;
132
- CF_JSON.UsageAPI = null;
133
} else if (newConfig.AccountID && newConfig.APIToken) {
134
- CF_JSON.Email = null;
135
- CF_JSON.GlobalAPIKey = null;
136
CF_JSON.AccountID = newConfig.AccountID;
137
CF_JSON.APIToken = newConfig.APIToken;
138
+ } else if (newConfig.UsageAPI){
+ CF_JSON.UsageAPI = newConfig.UsageAPI;
139
} else {
140
return new Response(JSON.stringify({ error: '配置不完整' }), { status: 400, headers: { 'Content-Type': 'application/json;charset=utf-8' } });
141
}
0 commit comments