(cherry picked from commit 490f6e2e6aa3f220cc98f257a3ca3b2bea48fb80) (cherry picked from commit 8f3f90d4078d9d072d8ad4ccc3be35963b7435d6)pull/2397/head
parent
876376cb77
commit
2b0da546c9
@ -1,21 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Microsoft.AspNetCore.Mvc.Routing;
|
||||
|
||||
namespace Lidarr.Http.REST.Attributes
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
public class RestGetByIdAttribute : ActionFilterAttribute, IActionHttpMethodProvider, IRouteTemplateProvider
|
||||
public class RestGetByIdAttribute : Attribute, IActionHttpMethodProvider, IRouteTemplateProvider
|
||||
{
|
||||
public override void OnActionExecuting(ActionExecutingContext context)
|
||||
{
|
||||
Console.WriteLine($"OnExecuting {context.Controller.GetType()} {context.ActionDescriptor.DisplayName}");
|
||||
}
|
||||
|
||||
public IEnumerable<string> HttpMethods => new[] { "GET" };
|
||||
public string Template => "{id:int}";
|
||||
public new int? Order => 0;
|
||||
public int? Order => 0;
|
||||
public string Name { get; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in new issue