Files
splootybean 387ec7ba89 Initialize repository
Added basic info to get in game for like...August 2016 ;-;
It's not much but it's a start
2026-02-27 00:58:13 -08:00

23 lines
893 B
C#

using Microsoft.AspNetCore.Mvc;
using RecRoomArchive.Services;
namespace RecRoomArchive.Controllers
{
/// <summary>
/// Only exists for pre-RecNet versions of Rec Room to be able to fetch a Message of the Day from the server...
/// </summary>
[ApiController]
public class RootController(MessageOfTheDayService motdService) : ControllerBase
{
/// <summary>
/// Gets the legacy version of the Message of the Day, to display on the login screen in pre-Dorm Room versions of the game
/// </summary>
/// <returns>A basic string to display in game, related to the Message of the Day</returns>
[HttpGet(template: "motd")]
public async Task<ActionResult<string>> GetMessageOfTheDay()
{
var messageOfTheDay = await motdService.GetMessageOfTheDay();
return Ok(messageOfTheDay);
}
}
}