Get time api

This commit is contained in:
2023-11-14 15:11:10 +00:00
parent 3a9a8dc1e7
commit 411a5aa6ff

View File

@ -0,0 +1,16 @@
using Microsoft.AspNetCore.Mvc;
namespace NostrStreamer.Controllers;
[Route("/api/time")]
public class TimeController : Controller
{
[HttpGet]
public IActionResult GetTime()
{
return Json(new
{
time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()
});
}
}