mirror of
https://github.com/CyberL1/MyMcRealms.git
synced 2025-04-10 18:08:36 -04:00
41 lines
913 B
C#
41 lines
913 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using MyMcRealms.Attributes;
|
|
using MyMcRealms.Responses;
|
|
|
|
namespace MyMcRealms.Controllers
|
|
{
|
|
[Route("[controller]")]
|
|
[ApiController]
|
|
[RequireMinecraftCookie]
|
|
public class McoController : ControllerBase
|
|
{
|
|
[HttpGet("available")]
|
|
public bool GetAvailable()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
[HttpGet("client/compatible")]
|
|
public string GetCompatible()
|
|
{
|
|
return Compatility.COMPATIBLE.ToString();
|
|
}
|
|
|
|
[HttpGet("v1/news")]
|
|
public NewsResponse GetNews()
|
|
{
|
|
var news = new NewsResponse
|
|
{
|
|
NewsLink = "https://github.com/CyberL1/Minecraft-Realms-Emulator",
|
|
};
|
|
|
|
return news;
|
|
}
|
|
|
|
[HttpPost("tos/agreed")]
|
|
public ActionResult TosAgree()
|
|
{
|
|
return Ok();
|
|
}
|
|
}
|
|
} |