mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 23:18:44 -07:00
70980bf3b6
- Implemented ProgressionEventsController to handle progression event retrieval and active events. - Created RoomConsumablesController for listing and purchasing room consumables. - Developed RoomCurrenciesController for managing room currencies, including creation, updates, and balance retrieval. - Added RoomEarningsDistributionsController to fetch earnings distribution data for rooms. - Introduced ScreenShareReportsController for reporting screen share incidents. - Established SubscriptionSeasonsController to provide current subscription season details and rewards. - Launched UgcPurchasablesController for managing user-generated content purchasables, including bulk operations. - Added new data entities for customization and room economy, including custom avatar items, room currencies, and UGC purchasables.
48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using DorkNet.Server.Auth;
|
|
using DorkNet.Server.Data;
|
|
using DorkNet.Server.Data.Entities;
|
|
|
|
namespace DorkNet.Server.Controllers.API.AppIntegrity;
|
|
|
|
[ApiController]
|
|
public class AppIntegrityController(DorkNetDbContext db) : ControllerBase
|
|
{
|
|
[HttpGet("api/AppIntegrity/v1/iosproducts")]
|
|
[AllowAnonymous]
|
|
public async Task<IActionResult> IosProducts()
|
|
{
|
|
var rows = await db.StoreItems
|
|
.Where(i => i.IsActive)
|
|
.OrderBy(i => i.Id)
|
|
.Take(100)
|
|
.Select(i => new
|
|
{
|
|
ProductId = i.Slug,
|
|
i.Price,
|
|
i.CurrencyType,
|
|
Name = i.DisplayName,
|
|
})
|
|
.ToListAsync();
|
|
return Ok(rows);
|
|
}
|
|
|
|
[HttpPost("api/AppIntegrity/v1/iospaymentqueuefailed")]
|
|
[Authorize]
|
|
public async Task<IActionResult> IosPaymentQueueFailed([FromForm] string? reason)
|
|
{
|
|
db.BugReports.Add(new BugReportEntity
|
|
{
|
|
ReporterPlayerId = this.RequireCurrentPlayerId(),
|
|
Title = "iOS payment queue failed",
|
|
Body = reason ?? Request.Query["reason"].FirstOrDefault() ?? string.Empty,
|
|
Category = "appintegrity",
|
|
CreatedAt = DateTime.UtcNow,
|
|
});
|
|
await db.SaveChangesAsync();
|
|
return Ok(new { Success = true });
|
|
}
|
|
}
|