2022-06-29 19:46:41 -04:00
|
|
|
|
using Bit.Core.Utilities;
|
2021-12-09 15:45:45 -05:00
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Bit.Identity.Controllers;
|
2022-08-29 16:06:55 -04:00
|
|
|
|
|
2021-12-09 15:45:45 -05:00
|
|
|
|
public class InfoController : Controller
|
|
|
|
|
|
{
|
|
|
|
|
|
[HttpGet("~/alive")]
|
|
|
|
|
|
public DateTime GetAlive()
|
|
|
|
|
|
{
|
|
|
|
|
|
return DateTime.UtcNow;
|
|
|
|
|
|
}
|
2021-12-16 15:35:09 +01:00
|
|
|
|
|
2025-09-02 18:30:53 +02:00
|
|
|
|
[HttpGet("~/now")]
|
|
|
|
|
|
[Obsolete("This endpoint is deprecated. Use GET /alive instead.")]
|
|
|
|
|
|
public DateTime GetNow()
|
|
|
|
|
|
{
|
|
|
|
|
|
return GetAlive();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-12-09 15:45:45 -05:00
|
|
|
|
[HttpGet("~/version")]
|
|
|
|
|
|
public JsonResult GetVersion()
|
|
|
|
|
|
{
|
2022-09-05 11:19:04 -04:00
|
|
|
|
return Json(AssemblyHelpers.GetVersion());
|
2021-12-09 15:45:45 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|