mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-27 23:06:29 -04:00
New: Use ASP.NET Core instead of Nancy
Co-Authored-By: ta264 <ta264@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Mvc.Routing;
|
||||
|
||||
namespace Sonarr.Http
|
||||
{
|
||||
public class VersionedFeedControllerAttribute : Attribute, IRouteTemplateProvider
|
||||
{
|
||||
public VersionedFeedControllerAttribute(int version, string resource = "[controller]")
|
||||
{
|
||||
Version = version;
|
||||
Template = $"feed/v{Version}/{resource}";
|
||||
}
|
||||
|
||||
public string Template { get; private set; }
|
||||
public int? Order => 2;
|
||||
public string Name { get; set; }
|
||||
public int Version { get; private set; }
|
||||
}
|
||||
|
||||
public class V3FeedControllerAttribute : VersionedFeedControllerAttribute
|
||||
{
|
||||
public V3FeedControllerAttribute(string resource = "[controller]")
|
||||
: base(3, resource)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user