aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/System/SystemService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/System/SystemService.cs')
-rw-r--r--MediaBrowser.Api/System/SystemService.cs22
1 files changed, 14 insertions, 8 deletions
diff --git a/MediaBrowser.Api/System/SystemService.cs b/MediaBrowser.Api/System/SystemService.cs
index 3f2b3d66a..2661c245f 100644
--- a/MediaBrowser.Api/System/SystemService.cs
+++ b/MediaBrowser.Api/System/SystemService.cs
@@ -13,6 +13,7 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
using CommonIO;
+using MediaBrowser.Model.Net;
namespace MediaBrowser.Api.System
{
@@ -32,6 +33,12 @@ namespace MediaBrowser.Api.System
}
+ [Route("/System/Ping", "POST")]
+ public class PingSystem : IReturnVoid
+ {
+
+ }
+
/// <summary>
/// Class RestartApplication
/// </summary>
@@ -59,7 +66,7 @@ namespace MediaBrowser.Api.System
[Route("/System/Endpoint", "GET", Summary = "Gets information about the request endpoint")]
[Authenticated]
- public class GetEndpointInfo : IReturn<EndpointInfo>
+ public class GetEndpointInfo : IReturn<EndPointInfo>
{
public string Endpoint { get; set; }
}
@@ -104,6 +111,11 @@ namespace MediaBrowser.Api.System
_security = security;
}
+ public object Post(PingSystem request)
+ {
+ return _appHost.Name;
+ }
+
public object Get(GetServerLogs request)
{
List<FileSystemMetadata> files;
@@ -199,17 +211,11 @@ namespace MediaBrowser.Api.System
public object Get(GetEndpointInfo request)
{
- return ToOptimizedResult(new EndpointInfo
+ return ToOptimizedResult(new EndPointInfo
{
IsLocal = Request.IsLocal,
IsInNetwork = _network.IsInLocalNetwork(request.Endpoint ?? Request.RemoteIp)
});
}
}
-
- public class EndpointInfo
- {
- public bool IsLocal { get; set; }
- public bool IsInNetwork { get; set; }
- }
}