mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-31 06:21:11 +00:00 
			
		
		
		
	Fix broken webhooks (#29690)
Fix #29689 (cherry picked from commit 6e8762f962c5eaaee1c92e910c95c8b85b7c1e11)
This commit is contained in:
		
					parent
					
						
							
								27beed74b5
							
						
					
				
			
			
				commit
				
					
						1b8aa3ab6f
					
				
			
		
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -94,7 +94,12 @@ func newJSONRequest[T any](pc payloadConvertor[T], w *webhook_model.Webhook, t * | |||
| 		return nil, nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	req, err := http.NewRequest(w.HTTPMethod, w.URL, bytes.NewReader(body)) | ||||
| 	method := w.HTTPMethod | ||||
| 	if method == "" { | ||||
| 		method = http.MethodPost | ||||
| 	} | ||||
| 
 | ||||
| 	req, err := http.NewRequest(method, w.URL, bytes.NewReader(body)) | ||||
| 	if err != nil { | ||||
| 		return nil, nil, err | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue