mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 00:52:49 -05:00
Standardize '/version' endpoint on all services (#1755)
This commit is contained in:
22
src/Notifications/Controllers/InfoController.cs
Normal file
22
src/Notifications/Controllers/InfoController.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
namespace Bit.Notifications.Controllers
|
||||
{
|
||||
public class InfoController : Controller
|
||||
{
|
||||
[HttpGet("~/alive")]
|
||||
[HttpGet("~/now")]
|
||||
public DateTime GetAlive()
|
||||
{
|
||||
return DateTime.UtcNow;
|
||||
}
|
||||
|
||||
[HttpGet("~/version")]
|
||||
public JsonResult GetVersion()
|
||||
{
|
||||
return Json(CoreHelpers.GetVersion());
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Bit.Core.Utilities;
|
||||
@ -19,14 +18,6 @@ namespace Bit.Notifications
|
||||
_hubContext = hubContext;
|
||||
}
|
||||
|
||||
[HttpGet("~/alive")]
|
||||
[HttpGet("~/now")]
|
||||
[AllowAnonymous]
|
||||
public DateTime GetAlive()
|
||||
{
|
||||
return DateTime.UtcNow;
|
||||
}
|
||||
|
||||
[HttpPost("~/send")]
|
||||
[SelfHosted(SelfHostedOnly = true)]
|
||||
public async Task PostSend()
|
||||
|
Reference in New Issue
Block a user