Changes:
- Добавил затычку в амовебхук, при пустом запросе возвращать 200
This commit is contained in:
parent
fba01b2518
commit
b4aa3dee97
@ -188,6 +188,11 @@ func (h *Handlers) GeneratorByAmoWebhook(w http.ResponseWriter, r *http.Request)
|
||||
|
||||
body := string(reqBody)
|
||||
|
||||
if body == "" {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println()
|
||||
bodyUnescaped, err := url.QueryUnescape(body)
|
||||
fmt.Println("WEBHOOK BODY:", bodyUnescaped)
|
||||
|
@ -364,7 +364,7 @@ func (h *Handlers) TemplateInit(w http.ResponseWriter, r *http.Request) {
|
||||
//
|
||||
//// Send to Yandex Disk
|
||||
//
|
||||
//err = client.UploadResources(YaDiskData.SaveFolder+"/"+saveFilename, "https://solweb.site/tmp/parsed/"+saveFilename)
|
||||
//err = client.UploadResourcesUrl(YaDiskData.SaveFolder+"/"+saveFilename, "https://solweb.site/tmp/parsed/"+saveFilename)
|
||||
//if err != nil {
|
||||
// h.reportError(w, err, http.StatusInternalServerError)
|
||||
// return
|
||||
|
Loading…
Reference in New Issue
Block a user