using Microsoft.AspNetCore.Mvc; namespace NotPogo.Controllers { public class CDLController : Controller { [HttpGet] [Route("/cdl/cdl-info.jsp")] public IResult CDLInfo(string lkey) { // this is just to satisfy download clients if (string.IsNullOrEmpty(lkey)) return Results.Text(""); else return Results.Text("error none screenname 'NotPogoUser' site 'pogo' tokens 9999 enti 'oava 1 obad 1'"); } [HttpGet("/cdl/1/login")] public IResult CDLLogin() { // more satisfying return Results.Text($"\n{Guid.NewGuid()}", "text/xml"); } [HttpGet("/cdl/1/cdl-clientprops")] public IActionResult CDLClientProps(string game) { string pathToProps = Path.Combine(AppContext.BaseDirectory, "StaticFiles", "Configs", "CDL", $"{game}.properties"); if (System.IO.File.Exists(pathToProps)) return Ok(System.IO.File.ReadAllText(pathToProps)); else return Ok(); // don't send anything since we don't have the config for it on the server yet } } }