1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 16:42:50 -05:00

Standardize '/version' endpoint on all services (#1755)

This commit is contained in:
Vince Grassia
2021-12-09 15:45:45 -05:00
committed by GitHub
parent d3673cdc85
commit 2ec10cfd2a
18 changed files with 201 additions and 130 deletions

View File

@ -1,25 +0,0 @@
using System;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Billing.Controllers
{
public class HomeController : Controller
{
[HttpGet("~/alive")]
[HttpGet("~/now")]
[AllowAnonymous]
public DateTime GetAlive()
{
return DateTime.UtcNow;
}
/*
[Authorize]
public IActionResult Index()
{
return View();
}
*/
}
}

View File

@ -0,0 +1,22 @@
using System;
using Microsoft.AspNetCore.Mvc;
using Bit.Core.Utilities;
namespace Bit.Billing.Controllers
{
public class InfoController : Controller
{
[HttpGet("~/alive")]
[HttpGet("~/now")]
public DateTime GetAlive()
{
return DateTime.UtcNow;
}
[HttpGet("~/version")]
public JsonResult GetVersion()
{
return Json(CoreHelpers.GetVersion());
}
}
}