feat: support webhook (#1187)

This commit is contained in:
Copilot authored and GitHub committed 2025-11-25 23:34:45 +08:00
1 parent 5bb8541385
commit 9d9f1caaaa
15 files changed
+1361 -33

No files matched your search

+11
View File
@@ -389,3 +389,14 @@ func getServerConfig() *base.DownloaderStoreConfig {
cfg, _ := Downloader.GetConfig()
return cfg
}
func TestWebhook(w http.ResponseWriter, r *http.Request) {
var req model.TestWebhookReq
if ReadJson(r, w, &req) {
if err := Downloader.TestWebhookUrl(req.URL); err != nil {
WriteJson(w, model.NewErrorResult(err.Error()))
return
}
WriteJson(w, model.NewNilResult())
}
}