mirror of
https://github.com/myawired/2025-RecRoom-Server-E12354.git
synced 2026-07-18 00:21:15 +10:00
32 lines
768 B
C#
32 lines
768 B
C#
using System.Text;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Newtonsoft.Json;
|
|
using Rec_rewild_live_rewrite.api.server;
|
|
|
|
namespace Rec_rewild_live_rewrite.Controllers
|
|
{
|
|
[Route("/data/")]
|
|
public class DataController : ControllerBase
|
|
{
|
|
[HttpPost("event")]
|
|
public IActionResult CollectEvent()
|
|
{
|
|
var (account, error) = AuthHelper.ValidateToken(HttpContext);
|
|
if (error != null)
|
|
return error;
|
|
|
|
return Ok();
|
|
}
|
|
|
|
[HttpPost("heartbeat")]
|
|
public IActionResult CollectHeartbeat()
|
|
{
|
|
var (account, error) = AuthHelper.ValidateToken(HttpContext);
|
|
if (error != null)
|
|
return error;
|
|
|
|
return Ok();
|
|
}
|
|
}
|
|
}
|