Skip to content

Commit 8ec7440

Browse files
Adding testing endpoint
The twitch webhooks API requires a publicly available endpoint that is protected by a valid SSL certificate. We will put this testing endpoint up so we can start building out a chat subscription endpoint
1 parent d325c3e commit 8ec7440

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using log4net;
2+
3+
using Microsoft.AspNetCore.Authorization;
4+
using Microsoft.AspNetCore.Mvc;
5+
6+
namespace Nullinside.Api.TwitchBot.Controllers;
7+
8+
/// <summary>
9+
/// testing
10+
/// </summary>
11+
[AllowAnonymous]
12+
[ApiController]
13+
[Route("[controller]")]
14+
public class TwitchWebHookController : ControllerBase {
15+
/// <summary>
16+
/// The logger.
17+
/// </summary>
18+
private readonly ILog _log = LogManager.GetLogger(typeof(TwitchWebHookController));
19+
20+
/// <summary>
21+
/// testing
22+
/// </summary>
23+
/// <param name="stuff"></param>
24+
/// <param name="token"></param>
25+
/// <returns></returns>
26+
[HttpPost]
27+
[Route("chat")]
28+
public IActionResult TwitchChatMessageCallback(string stuff, CancellationToken token) {
29+
_log.Info(stuff);
30+
return Ok(true);
31+
}
32+
}

0 commit comments

Comments
 (0)