mirror of
https://github.com/JogmansonReal/Radicade.git
synced 2026-10-27 07:59:03 -07:00
Radicade Public Code
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using RadicadeServer.DB;
|
||||
using RadicadeServer.Extensions;
|
||||
using RadicadeServer.RecNet.Avatar;
|
||||
using RadicadeServer.Utils.Attributes;
|
||||
|
||||
namespace RadicadeServer.API.Avatars.V1
|
||||
{
|
||||
[Route("api/avatar/v1")]
|
||||
[Route("econ/api/avatar/v1")]
|
||||
public class AvatarV1 : Controller
|
||||
{
|
||||
RecDBContext db;
|
||||
public AvatarV1(RecDBContext context)
|
||||
{
|
||||
this.db = context;
|
||||
}
|
||||
|
||||
[HttpGet("defaultunlocked")]
|
||||
public List<AvatarItem> GetDefaultUnlocks()
|
||||
{
|
||||
return AvatarUnlockCatalog.GetStarterItems();
|
||||
}
|
||||
|
||||
[HttpGet("defaultbaseavataritems")]
|
||||
public IActionResult GetDefaultBaseAvatarItems()
|
||||
{
|
||||
try
|
||||
{
|
||||
return Ok(AvatarUnlockCatalog.GetSafeDefaultItems()
|
||||
.Where(item => item.IsBaseAvatarItem).ToList());
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return Ok(Array.Empty<AvatarItem>());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user