|
|
@ -25,6 +25,11 @@ namespace Squidex.Pipeline.CommandMiddlewares |
|
|
|
|
|
|
|
|
public Task HandleAsync(CommandContext context, Func<Task> next) |
|
|
public Task HandleAsync(CommandContext context, Func<Task> next) |
|
|
{ |
|
|
{ |
|
|
|
|
|
if (httpContextAccessor.HttpContext == null) |
|
|
|
|
|
{ |
|
|
|
|
|
return next(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (context.Command is IAppCommand appCommand && appCommand.AppId == null) |
|
|
if (context.Command is IAppCommand appCommand && appCommand.AppId == null) |
|
|
{ |
|
|
{ |
|
|
var appFeature = httpContextAccessor.HttpContext.Features.Get<IAppFeature>(); |
|
|
var appFeature = httpContextAccessor.HttpContext.Features.Get<IAppFeature>(); |
|
|
|