Add remaining project files

This commit is contained in:
Marco Baldwin
2026-07-23 18:21:43 -07:00
parent c12d8ac35d
commit 6e15e89a9d
453 changed files with 64265 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using static DeluxeBackend.Enums;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace DeluxeBackend.Controllers
{
[Route("nameserver")]
[ApiController]
public class NameServerController : ControllerBase
{
private readonly Dictionary<string, string> nameserData = [];
[HttpGet]
public async Task<IActionResult> Ns()
{
if (nameserData.Count == 0)
{
foreach (Service service in Enum.GetValues<Service>())
{
if (service == Service.WWW || service == Service.API || service == Service.Econ)
{
nameserData.Add(service.ToString(), $"https://{Request.Host}");
continue;
}
if (service == Service.CDN)
{
#if DEBUG
nameserData.Add(service.ToString(), "https://YOUR-URL");
#else
nameserData.Add(service.ToString(), "https://YOUR-URL");
#endif
continue;
}
nameserData.Add(service.ToString(), $"https://{Request.Host}/{service}/");
}
}
return Ok(nameserData);
}
}
}