mirror of
https://github.com/JogmansonReal/Radicade.git
synced 2026-10-25 23:18:56 -07:00
Radicade Public Code
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using RadicadeServer.RecNet.Store;
|
||||
using RadicadeServer.Extensions;
|
||||
|
||||
namespace RadicadeServer.API.CampusCard.V1
|
||||
{
|
||||
[Route("api/CampusCard/v1")]
|
||||
[Route("econ/api/CampusCard/v1")]
|
||||
public class CampusCardAPI : Controller
|
||||
{
|
||||
[HttpPost("UpdateAndGetSubscription")]
|
||||
public ActionResult<RecNet.Store.CampusCard> GetSubscription()
|
||||
{
|
||||
var playerId = User?.GetUserId() ?? 0;
|
||||
var now = DateTime.UtcNow;
|
||||
return Ok(new RecNet.Store.CampusCard
|
||||
{
|
||||
subscription = new CampusCardSubscription
|
||||
{
|
||||
subscriptionId = 1,
|
||||
recNetPlayerId = playerId,
|
||||
platformType = null,
|
||||
platformId = "",
|
||||
platformPurchaseId = "",
|
||||
level = RecNet.Enums.Store.SKU.CampusCardLevel.Gold,
|
||||
period = RecNet.Enums.Store.SKU.CampusCardPeriod.Year,
|
||||
expirationDate = now.AddYears(1),
|
||||
isAutoRenewing = true,
|
||||
createdAt = now,
|
||||
modifiedAt = now
|
||||
},
|
||||
platformAccountSubscribedPlayerId = null
|
||||
});
|
||||
}
|
||||
|
||||
[HttpGet("SignUpBonus")]
|
||||
public IActionResult SignUpBonus() => Ok(new
|
||||
{
|
||||
RRPlusSignUpBonusId = 3,
|
||||
MinFreeItemsPrice = 0,
|
||||
MaxFreeItemsPrice = 10000
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user