mirror of
https://github.com/myawired/2025-RecRoom-Server-E12354.git
synced 2026-07-18 00:21:15 +10:00
Initial upload
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user