Bumped Liquidpy and added other webhook protocols (e.g. GET)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
urllib3==1.26.5
|
urllib3==1.26.5
|
||||||
requests==2.25.1
|
requests==2.25.1
|
||||||
MarkupSafe==2.0.1
|
MarkupSafe==2.0.1
|
||||||
liquidpy==0.7.1
|
liquidpy==0.7.2
|
||||||
|
|||||||
+13
-4
@@ -1955,9 +1955,18 @@ func handleWebhookCallback(resp http.ResponseWriter, request *http.Request) {
|
|||||||
// 1. Get callback data
|
// 1. Get callback data
|
||||||
// 2. Load the configuration
|
// 2. Load the configuration
|
||||||
// 3. Execute the workflow
|
// 3. Execute the workflow
|
||||||
cors := shuffle.HandleCors(resp, request)
|
//cors := shuffle.HandleCors(resp, request)
|
||||||
if cors {
|
//if cors {
|
||||||
return
|
// return
|
||||||
|
//}
|
||||||
|
|
||||||
|
if request.Method != "POST" {
|
||||||
|
request.Method = "POST"
|
||||||
|
}
|
||||||
|
|
||||||
|
if request.Body == nil {
|
||||||
|
stringReader := strings.NewReader("")
|
||||||
|
request.Body = ioutil.NopCloser(stringReader)
|
||||||
}
|
}
|
||||||
|
|
||||||
path := strings.Split(request.URL.String(), "/")
|
path := strings.Split(request.URL.String(), "/")
|
||||||
@@ -5732,7 +5741,7 @@ func initHandlers() {
|
|||||||
|
|
||||||
// Triggers
|
// Triggers
|
||||||
r.HandleFunc("/api/v1/hooks/new", shuffle.HandleNewHook).Methods("POST", "OPTIONS")
|
r.HandleFunc("/api/v1/hooks/new", shuffle.HandleNewHook).Methods("POST", "OPTIONS")
|
||||||
r.HandleFunc("/api/v1/hooks/{key}", handleWebhookCallback).Methods("POST", "OPTIONS")
|
r.HandleFunc("/api/v1/hooks/{key}", handleWebhookCallback).Methods("POST", "GET", "PATCH", "PUT", "DELETE", "OPTIONS")
|
||||||
r.HandleFunc("/api/v1/hooks/{key}/delete", shuffle.HandleDeleteHook).Methods("DELETE", "OPTIONS")
|
r.HandleFunc("/api/v1/hooks/{key}/delete", shuffle.HandleDeleteHook).Methods("DELETE", "OPTIONS")
|
||||||
|
|
||||||
// OpenAPI configuration
|
// OpenAPI configuration
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
frontend:
|
frontend:
|
||||||
#build: ./frontend
|
build: ./frontend
|
||||||
image: ghcr.io/frikky/shuffle-frontend:nightly
|
image: ghcr.io/frikky/shuffle-frontend:nightly
|
||||||
container_name: shuffle-frontend
|
container_name: shuffle-frontend
|
||||||
hostname: shuffle-frontend
|
hostname: shuffle-frontend
|
||||||
@@ -16,7 +16,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
backend:
|
backend:
|
||||||
#build: ./backend
|
build: ./backend
|
||||||
image: ghcr.io/frikky/shuffle-backend:nightly
|
image: ghcr.io/frikky/shuffle-backend:nightly
|
||||||
container_name: shuffle-backend
|
container_name: shuffle-backend
|
||||||
hostname: ${BACKEND_HOSTNAME}
|
hostname: ${BACKEND_HOSTNAME}
|
||||||
|
|||||||
Reference in New Issue
Block a user