remove invalid attribute parameter

This commit is contained in:
Pilzinsel64
2024-11-29 11:33:17 +01:00
parent 342e9ed0d8
commit 3fea994e93

View File

@@ -3,14 +3,8 @@
[AttributeUsage(AttributeTargets.Method)] [AttributeUsage(AttributeTargets.Method)]
public class ApiMessageHandlerAttribute(string route, params string[] methods) : Attribute public class ApiMessageHandlerAttribute(string route, params string[] methods) : Attribute
{ {
public ApiMessageHandlerAttribute(string route, params HttpMethod[] methods)
: this(route, methods.Select(m => m.Method).ToArray())
{
}
public ApiMessageHandlerAttribute(string route) public ApiMessageHandlerAttribute(string route)
: this(route, HttpMethod.Post) : this(route, HttpMethod.Post.Method)
{ {
} }