mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 09:02:48 -05:00
version api and re-route other misc apis
This commit is contained in:
28
src/Api/Controllers/MiscController.cs
Normal file
28
src/Api/Controllers/MiscController.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Linq;
|
||||
using Bit.Core.Models.Api;
|
||||
|
||||
namespace Bit.Api.Controllers
|
||||
{
|
||||
public class MiscController : Controller
|
||||
{
|
||||
[HttpGet("~/alive")]
|
||||
public DateTime Get()
|
||||
{
|
||||
return DateTime.UtcNow;
|
||||
}
|
||||
|
||||
[HttpGet("~/claims")]
|
||||
public IActionResult Claims()
|
||||
{
|
||||
return new JsonResult(User?.Claims?.Select(c => new { c.Type, c.Value }));
|
||||
}
|
||||
|
||||
[HttpGet("~/version")]
|
||||
public VersionResponseModel Version()
|
||||
{
|
||||
return new VersionResponseModel();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user