mirror of
https://github.com/JogmansonReal/Radicade.git
synced 2026-10-25 23:18:56 -07:00
32 lines
597 B
C#
32 lines
597 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using RadicadeServer.RecNet.Moderation;
|
|
|
|
namespace RadicadeServer.API.Moderation
|
|
{
|
|
[Route("api/PlayerReporting/v1/")]
|
|
public class HileAPI : Controller
|
|
{
|
|
|
|
public HileAPI() {
|
|
}
|
|
|
|
[HttpPost("hile")]
|
|
public IActionResult PostHile([FromForm] Hile hile)
|
|
{
|
|
|
|
var body = Environment.GetEnvironmentVariable("RADICADE_HILE_BODY") ?? "ok-true";
|
|
switch (body)
|
|
{
|
|
case "ok-false":
|
|
return Ok(false);
|
|
case "nocontent":
|
|
return NoContent();
|
|
case "servererror":
|
|
return StatusCode(500);
|
|
default:
|
|
return Ok(true);
|
|
}
|
|
}
|
|
}
|
|
}
|