1
0
mirror of https://github.com/CyberL1/MyMcRealms.git synced 2024-09-19 16:02:51 -04:00
MyMcRealms/Minecraft-Realms-Emulator/Controllers/TrialController.cs
2024-04-20 09:20:30 +02:00

25 lines
640 B
C#

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);
}
}
}