mirror of
https://git.recroomarchive.org/RecRoomArchive/RRAC.git
synced 2026-09-08 14:41:25 -07:00
Initialize repository
Added basic info to get in game for like...August 2016 ;-; It's not much but it's a start
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using RecRoomArchive.Services;
|
||||
|
||||
namespace RecRoomArchive.Controllers.API.VersionCheck.V1
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoints used to check if the version the player is playing on is up to date enough to play Rec Room, due to this being a custom server, it doesn't really matter
|
||||
/// </summary>
|
||||
[Route(template: "api/[controller]/v1")]
|
||||
[ApiController]
|
||||
public class VersionCheckController(AppVersionService appVersionService) : ControllerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Checks if the appVersion provided is allowed to play (which it most certainly will be unless its a weird build or someone messed with it)
|
||||
/// </summary>
|
||||
/// <returns>An Ok response if the version is valid, Forbid if it is not. Forbid will yield the client displaying "Rec Room Update Required" soo maybe don't</returns>
|
||||
[HttpGet]
|
||||
public async Task<ActionResult> CheckVersion([FromHeader(Name = "X-Rec-Room-Version")] string appVersion)
|
||||
{
|
||||
if (appVersion == null)
|
||||
return Forbid();
|
||||
|
||||
return Ok();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user