Browse Source

Made handlers optional.

pull/95/head
Sebastian Stehle 9 years ago
parent
commit
51ad8f8321
  1. 2
      src/Squidex/Pipeline/CommandHandlers/EnrichWithActorHandler.cs
  2. 2
      src/Squidex/Pipeline/CommandHandlers/EnrichWithAppIdHandler.cs
  3. 2
      src/Squidex/Pipeline/CommandHandlers/EnrichWithSchemaIdHandler.cs

2
src/Squidex/Pipeline/CommandHandlers/EnrichWithActorHandler.cs

@ -30,7 +30,7 @@ namespace Squidex.Pipeline.CommandHandlers
public Task<bool> HandleAsync(CommandContext context) public Task<bool> HandleAsync(CommandContext context)
{ {
if (context.Command is SquidexCommand squidexCommand) if (context.Command is SquidexCommand squidexCommand && squidexCommand.Actor == null)
{ {
var actorToken = var actorToken =
FindActorFromSubject() ?? FindActorFromSubject() ??

2
src/Squidex/Pipeline/CommandHandlers/EnrichWithAppIdHandler.cs

@ -29,7 +29,7 @@ namespace Squidex.Pipeline.CommandHandlers
public Task<bool> HandleAsync(CommandContext context) public Task<bool> HandleAsync(CommandContext context)
{ {
if (context.Command is AppCommand appCommand) if (context.Command is AppCommand appCommand && appCommand.AppId == null)
{ {
var appFeature = httpContextAccessor.HttpContext.Features.Get<IAppFeature>(); var appFeature = httpContextAccessor.HttpContext.Features.Get<IAppFeature>();

2
src/Squidex/Pipeline/CommandHandlers/EnrichWithSchemaIdHandler.cs

@ -34,7 +34,7 @@ namespace Squidex.Pipeline.CommandHandlers
public async Task<bool> HandleAsync(CommandContext context) public async Task<bool> HandleAsync(CommandContext context)
{ {
if (context.Command is SchemaCommand schemaCommand) if (context.Command is SchemaCommand schemaCommand && schemaCommand.SchemaId == null)
{ {
var routeValues = actionContextAccessor.ActionContext.RouteData.Values; var routeValues = actionContextAccessor.ActionContext.RouteData.Values;

Loading…
Cancel
Save