fix(cloudflare): 测试连接使用当前输入的 Account ID 并发布 v1.6.9
CI / verify (push) Canceled after 0s

This commit is contained in:
2026-09-28 18:30:34 +08:00
parent 8f78aad19b
commit af07ebd462
11 changed files with 50 additions and 27 deletions
+4 -3
View File
@@ -191,14 +191,15 @@ func (h *CloudflareHandler) SaveAppSettings(w http.ResponseWriter, r *http.Reque
func (h *CloudflareHandler) TestToken(w http.ResponseWriter, r *http.Request) {
var request struct {
Token string `json:"token"`
Kind string `json:"kind"`
AccountID string `json:"account_id"`
Token string `json:"token"`
Kind string `json:"kind"`
}
if err := json.NewDecoder(http.MaxBytesReader(w, r.Body, 1<<20)).Decode(&request); err != nil {
writeError(r, w, http.StatusBadRequest, "请求格式无效")
return
}
message, err := h.svc.TestToken(r.Context(), request.Token, request.Kind)
message, err := h.svc.TestToken(r.Context(), request.AccountID, request.Token, request.Kind)
if err != nil {
writeError(r, w, http.StatusBadGateway, err.Error())
return