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)
|
body := string(reqBody)
|
||||||
|
|
||||||
|
if body == "" {
|
||||||
|
w.WriteHeader(http.StatusOK)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
bodyUnescaped, err := url.QueryUnescape(body)
|
bodyUnescaped, err := url.QueryUnescape(body)
|
||||||
fmt.Println("WEBHOOK BODY:", bodyUnescaped)
|
fmt.Println("WEBHOOK BODY:", bodyUnescaped)
|
||||||
|
@ -364,7 +364,7 @@ func (h *Handlers) TemplateInit(w http.ResponseWriter, r *http.Request) {
|
|||||||
//
|
//
|
||||||
//// Send to Yandex Disk
|
//// 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 {
|
//if err != nil {
|
||||||
// h.reportError(w, err, http.StatusInternalServerError)
|
// h.reportError(w, err, http.StatusInternalServerError)
|
||||||
// return
|
// return
|
||||||
|
Loading…
Reference in New Issue
Block a user