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