1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-20 21:55:03 -04:00

New: Use ASP.NET Core instead of Nancy

This commit is contained in:
ta264
2021-10-21 21:04:19 +01:00
committed by Qstick
parent c14ef7bee7
commit 2d53ec24f8
160 changed files with 2866 additions and 3657 deletions
@@ -0,0 +1,27 @@
using System;
using Microsoft.AspNetCore.Mvc.Routing;
namespace Radarr.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 : VersionedApiControllerAttribute
{
public V3FeedControllerAttribute(string resource = "[controller]")
: base(3, resource)
{
}
}
}