Get time api
This commit is contained in:
16
NostrStreamer/Controllers/TimeController.cs
Normal file
16
NostrStreamer/Controllers/TimeController.cs
Normal 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()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user