Radicade Public Code

This commit is contained in:
JogmansonReal
2026-10-16 23:33:13 -07:00
commit 55175acdf6
832 changed files with 363261 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using RadicadeServer.DB;
using RadicadeServer.Extensions;
using RadicadeServer.Utils;
namespace RadicadeServer.API.Config
{
[Route("api/voicechat")]
public class VoiceChatRestrictionAPI(RecDBContext db) : Controller
{
[HttpGet("restriction"), Authorize]
public async Task<IActionResult> GetRestriction()
{
var userId = User.GetUserId();
if (userId == null)
return Unauthorized(new { restricted = false });
var restriction = await VoiceChatRestrictions.ActiveAsync(db, userId.Value);
return Ok(VoiceChatRestrictions.Payload(restriction));
}
}
}