Skip to content

Commit e3fc75f

Browse files
Merge pull request #49 from nullinside-development-group/feature/TwitchChatWebhook
Adding testing endpoint
2 parents c1ec6ef + aa67dd1 commit e3fc75f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Nullinside.Api.TwitchBot/Controllers/TwitchWebHookController.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ public class TwitchWebHookController : ControllerBase {
2525
/// <returns></returns>
2626
[HttpPost]
2727
[Route("chat")]
28-
public IActionResult TwitchChatMessageCallback(string stuff, CancellationToken token) {
29-
_log.Info(stuff);
28+
public async Task<IActionResult> TwitchChatMessageCallback(CancellationToken token) {
29+
using StreamReader stream = new StreamReader(this.HttpContext.Request.Body);
30+
string stuff = await stream.ReadToEndAsync(token);
31+
_log.Info($"TwitchChatMessageCallback: {stuff}");
3032
return Ok(true);
3133
}
3234
}

0 commit comments

Comments
 (0)