Zeeshaun 2bed6aae4f
Some checks failed
Deploy Promiscuity Auth API / deploy (push) Successful in 49s
Deploy Promiscuity Character API / deploy (push) Successful in 46s
Deploy Promiscuity Crafting API / deploy (push) Successful in 47s
Deploy Promiscuity Inventory API / deploy (push) Successful in 47s
Deploy Promiscuity Locations API / deploy (push) Successful in 48s
Deploy Promiscuity Mail API / deploy (push) Successful in 46s
k8s smoke test / test (push) Has been cancelled
World microapi
2026-04-01 19:53:18 +00:00

25 lines
543 B
C#

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using WorldApi.Services;
namespace WorldApi.Controllers;
[ApiController]
[Route("api/[controller]")]
public class WorldController : ControllerBase
{
private readonly WorldCycleService _worldCycle;
public WorldController(WorldCycleService worldCycle)
{
_worldCycle = worldCycle;
}
[HttpGet("cycle")]
[Authorize(Roles = "USER,SUPER")]
public IActionResult GetCycle()
{
return Ok(_worldCycle.GetCurrentCycle());
}
}