Skip to content

Commit 84aa828

Browse files
authored
Merge pull request #53 from rubberduck-vba/webhook
Maybe fix webhook?
2 parents e42396e + f881330 commit 84aa828

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

rubberduckvba.Server/Api/Admin/WebhookController.cs

+4-3
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");

rubberduckvba.Server/Api/Tags/TagsController.cs

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public TagsController(CacheService cache, IRubberduckDbService db, ILogger<TagsC
2121
/// <summary>
2222
/// Gets information about the latest release tags.
2323
/// </summary>
24+
[HttpGet("api/v1/public/tags")] // legacy route
2425
[HttpGet("tags/latest")]
2526
[AllowAnonymous]
2627
public IActionResult Latest()

0 commit comments

Comments
 (0)