mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
fix(webhooks): increase timeout (#902)
* fix(webhooks): increase timeout * feat: mockindexer add dummy webhook endpoint
This commit is contained in:
parent
de4a6c7661
commit
c1746dc7d6
3 changed files with 25 additions and 11 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/autobrr/autobrr/test/mockindexer/irc"
|
||||
"github.com/go-chi/chi/v5"
|
||||
|
@ -32,6 +33,11 @@ func main() {
|
|||
r := chi.NewRouter()
|
||||
r.Use(middleware.Logger)
|
||||
|
||||
r.Post("/webhook", func(w http.ResponseWriter, r *http.Request) {
|
||||
time.Sleep(30 * time.Second)
|
||||
w.WriteHeader(http.StatusOK)
|
||||
})
|
||||
|
||||
r.Get("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write([]byte("<html><form method=\"POST\" action=\"/send\">Send an announce line to the channel<br><input style=\"width: 100%; margin-top: 5px; margin-bottom: 5px;\" name=\"line\" type=\"text\"><br><button type=\"submit\">Send to channel</button></form></html>"))
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue