mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
fixed service registration for event handlers and executors.
This commit is contained in:
@@ -23,13 +23,13 @@ namespace NzbDrone.Api.Commands
|
||||
{
|
||||
var commandType = _commands.Single(c => c.GetType().Name.Replace("Command", "").Equals(resource.Command, StringComparison.InvariantCultureIgnoreCase))
|
||||
.GetType();
|
||||
var command = (object)Request.Body.FromJson<ICommand>(commandType);
|
||||
var method = typeof(IMessageAggregator).GetMethod("PublishCommand");
|
||||
var genericMethod = method.MakeGenericMethod(commandType);
|
||||
genericMethod.Invoke(_messageAggregator, new[] { command });
|
||||
|
||||
|
||||
var command = Request.Body.FromJson<ICommand>(commandType);
|
||||
|
||||
_messageAggregator.PublishCommand(command);
|
||||
|
||||
return resource;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user