mirror of
https://github.com/JogmansonReal/Radicade.git
synced 2026-10-26 07:29:00 -07:00
43 lines
914 B
C#
43 lines
914 B
C#
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>());
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|