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
+22
View File
@@ -0,0 +1,22 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using RadicadeServer.DB;
namespace RadicadeServer.API
{
[Route("role")]
[Route("auth/role")]
public class RolesAPI(RecDBContext db) : Controller
{
[HttpGet("{roleType}/{id}")]
public async Task<bool> GetDeveloperRole(string roleType, long id)
{
var player = await db.Profiles.FirstOrDefaultAsync(x => x.accountId == id);
if (player != null)
{
return player.HasRole(roleType);
}
return false;
}
}
}