1
0
mirror of https://github.com/CyberL1/MyMcRealms.git synced 2024-11-14 10:28:21 -05:00
MyMcRealms/Minecraft-Realms-Emulator/Controllers/TrialController.cs

25 lines
640 B
C#
Raw Normal View History

2024-04-20 03:20:30 -04:00
using Microsoft.AspNetCore.Mvc;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
namespace Minecraft_Realms_Emulator.Controllers
{
[Route("[controller]")]
[ApiController]
[RequireMinecraftCookie]
public class TrialController : ControllerBase
{
private readonly DataContext _context;
public TrialController(DataContext context)
{
_context = context;
}
[HttpGet(Name = "GetTrial")]
public bool Get() {
return bool.Parse(_context.Configuration.FirstOrDefault(x => x.Key == "trialMode").Value);
}
}
}