1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

version info in response headers

This commit is contained in:
Kyle Spearrin
2017-08-25 08:57:43 -04:00
parent 0e2c86b1f5
commit eb9bb315c3
6 changed files with 61 additions and 30 deletions

View File

@ -1,5 +1,5 @@
using System;
using System.Reflection;
using Bit.Core.Utilities;
namespace Bit.Core.Models.Api
{
@ -8,13 +8,12 @@ namespace Bit.Core.Models.Api
public VersionResponseModel()
: base("version")
{
Version = Assembly.GetEntryAssembly()
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()
.InformationalVersion;
VersionInt = Convert.ToInt32(Version.Replace(".", string.Empty));
var info = CoreHelpers.GetVersionInfo();
Version = info.version;
VersionWeight = info.versionWeight;
}
public string Version { get; set; }
public int VersionInt { get; set; }
public int VersionWeight { get; set; }
}
}