diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-09-01 15:26:02 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-01 15:26:02 -0400 |
| commit | 03b93e02b986af5610fa2cd2b848bdf32f9d20d7 (patch) | |
| tree | e99f1c3e83354de8edc8b739c84a7e82731df081 /Emby.Server.Implementations/Services/ServiceController.cs | |
| parent | 00cb873164fb1619a2291e79bb53f3edcedcd731 (diff) | |
| parent | ac904c8ed0f79f63b61bdd0460a9f5a3b9ced65d (diff) | |
Merge pull request #2857 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/Services/ServiceController.cs')
| -rw-r--r-- | Emby.Server.Implementations/Services/ServiceController.cs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/Services/ServiceController.cs b/Emby.Server.Implementations/Services/ServiceController.cs index c3970b22f..4dc14a193 100644 --- a/Emby.Server.Implementations/Services/ServiceController.cs +++ b/Emby.Server.Implementations/Services/ServiceController.cs @@ -75,11 +75,7 @@ namespace Emby.Server.Implementations.Services var attrs = appHost.GetRouteAttributes(requestType); foreach (RouteAttribute attr in attrs) { - var restPath = new RestPath(appHost.CreateInstance, appHost.GetParseFn, requestType, attr.Path, attr.Verbs, attr.Summary, attr.Notes); - - if (!restPath.IsValid) - throw new NotSupportedException(string.Format( - "RestPath '{0}' on Type '{1}' is not Valid", attr.Path, requestType.GetMethodName())); + var restPath = new RestPath(appHost.CreateInstance, appHost.GetParseFn, requestType, attr.Path, attr.Verbs, attr.Summary); RegisterRestPath(restPath); } @@ -92,8 +88,7 @@ namespace Emby.Server.Implementations.Services if (!restPath.Path.StartsWith("/")) throw new ArgumentException(string.Format("Route '{0}' on '{1}' must start with a '/'", restPath.Path, restPath.RequestType.GetMethodName())); if (restPath.Path.IndexOfAny(InvalidRouteChars) != -1) - throw new ArgumentException(string.Format("Route '{0}' on '{1}' contains invalid chars. " + - "See https://github.com/ServiceStack/ServiceStack/wiki/Routing for info on valid routes.", restPath.Path, restPath.RequestType.GetMethodName())); + throw new ArgumentException(string.Format("Route '{0}' on '{1}' contains invalid chars. ", restPath.Path, restPath.RequestType.GetMethodName())); List<RestPath> pathsAtFirstMatch; if (!RestPathMap.TryGetValue(restPath.FirstMatchHashKey, out pathsAtFirstMatch)) |
