mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 07:46:05 -07:00
Added a version endpoint in "/api/version" #529
This commit is contained in:
parent
4ac771dc16
commit
afbb111121
1 changed files with 10 additions and 0 deletions
|
@ -36,6 +36,7 @@ using Newtonsoft.Json;
|
|||
|
||||
using PlexRequests.Core;
|
||||
using PlexRequests.Core.SettingModels;
|
||||
using PlexRequests.Helpers;
|
||||
|
||||
namespace PlexRequests.UI.Modules
|
||||
{
|
||||
|
@ -45,6 +46,9 @@ namespace PlexRequests.UI.Modules
|
|||
ISettingsService<PlexSettings> plexSettings, ISettingsService<CouchPotatoSettings> cp,
|
||||
ISettingsService<SonarrSettings> sonarr, ISettingsService<SickRageSettings> sr, ISettingsService<HeadphonesSettings> hp) : base("api", pr)
|
||||
{
|
||||
Get["GetVersion", "/version"] = x => GetVersion();
|
||||
|
||||
|
||||
Get["GetAuthSettings", "/settings/authentication"] = x => GetAuthSettings();
|
||||
Post["PostAuthSettings", "/settings/authentication"] = x => PostAuthSettings();
|
||||
|
||||
|
@ -83,6 +87,12 @@ namespace PlexRequests.UI.Modules
|
|||
private ISettingsService<SickRageSettings> SickRageSettings { get; }
|
||||
private ISettingsService<HeadphonesSettings> HeadphonesSettings { get; }
|
||||
|
||||
private Response GetVersion()
|
||||
{
|
||||
return ReturnReponse(AssemblyHelper.GetProductVersion());
|
||||
}
|
||||
|
||||
|
||||
private Response GetPrSettings()
|
||||
{
|
||||
var model = new ApiModel<PlexRequestSettings>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue