Skip to content

Commit f01680c

Browse files
committed
try accepting a dynamic parameter
1 parent 490493d commit f01680c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

rubberduckvba.Server/Api/Admin/WebhookController.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ public WebhookController(
2222

2323
[Authorize("webhook")]
2424
[HttpPost("webhook/github")]
25-
public async Task<IActionResult> GitHub()
25+
public async Task<IActionResult> GitHub(dynamic body)
2626
{
27-
var reader = new StreamReader(Request.Body);
28-
var json = await reader.ReadToEndAsync();
27+
//var reader = new StreamReader(Request.Body);
28+
//var json = await reader.ReadToEndAsync();
29+
string json = body.ToString();
2930

3031
var payload = JsonSerializer.Deserialize<PushWebhookPayload>(json, new JsonSerializerOptions { PropertyNameCaseInsensitive = true })
3132
?? throw new InvalidOperationException("Could not deserialize payload");

0 commit comments

Comments
 (0)