Initial commit: RR3 Community Server with web admin panel
- ASP.NET Core 8 REST API server - 12 API endpoints matching EA Synergy protocol - SQLite database with Entity Framework Core - Web admin panel with Bootstrap 5 - User, Catalog, Session, Purchase management - Comprehensive documentation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
49
RR3CommunityServer/Controllers/DirectorController.cs
Normal file
49
RR3CommunityServer/Controllers/DirectorController.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using RR3CommunityServer.Models;
|
||||
|
||||
namespace RR3CommunityServer.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("director/api/android")]
|
||||
public class DirectorController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<DirectorController> _logger;
|
||||
private readonly IConfiguration _configuration;
|
||||
|
||||
public DirectorController(ILogger<DirectorController> logger, IConfiguration configuration)
|
||||
{
|
||||
_logger = logger;
|
||||
_configuration = configuration;
|
||||
}
|
||||
|
||||
[HttpGet("getDirectionByPackage")]
|
||||
public ActionResult<SynergyResponse<DirectorResponse>> GetDirection([FromQuery] string packageName)
|
||||
{
|
||||
_logger.LogInformation("Director request for package: {Package}", packageName);
|
||||
|
||||
var baseUrl = $"{Request.Scheme}://{Request.Host}";
|
||||
|
||||
var response = new SynergyResponse<DirectorResponse>
|
||||
{
|
||||
resultCode = 0,
|
||||
message = "Success",
|
||||
data = new DirectorResponse
|
||||
{
|
||||
serverUrls = new Dictionary<string, string>
|
||||
{
|
||||
{ "synergy.product", baseUrl },
|
||||
{ "synergy.drm", baseUrl },
|
||||
{ "synergy.user", baseUrl },
|
||||
{ "synergy.tracking", baseUrl },
|
||||
{ "synergy.s2s", baseUrl },
|
||||
{ "nexus.portal", baseUrl },
|
||||
{ "ens.url", baseUrl }
|
||||
},
|
||||
environment = "COMMUNITY",
|
||||
version = "1.0.0"
|
||||
}
|
||||
};
|
||||
|
||||
return Ok(response);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user