api: allow no parameter on server

This commit is contained in:
Pilzinsel64
2024-09-30 14:38:18 +02:00
parent 03af05a8e9
commit 64dc7c776a

View File

@@ -59,7 +59,6 @@ public class ApiServer(string apiUrl) : IApiServer
// Sanity checks // Sanity checks
if (method.GetCustomAttribute<MessageHandlerAttribute>() is not MessageHandlerAttribute attribute if (method.GetCustomAttribute<MessageHandlerAttribute>() is not MessageHandlerAttribute attribute
|| method.GetParameters().FirstOrDefault() is not ParameterInfo parameter
|| !method.ReturnType.IsAssignableTo(typeof(ApiResult))) || !method.ReturnType.IsAssignableTo(typeof(ApiResult)))
{ {
if (throwOnError) if (throwOnError)