Browse Source

Several fixes.

pull/590/head
Sebastian 5 years ago
parent
commit
23656df998
  1. 6
      backend/src/Squidex.Domain.Apps.Entities.MongoDb/Rules/MongoRuleEventRepository.cs
  2. 10
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Comments/CommentsCommandMiddlewareTests.cs
  3. 6
      frontend/app/features/content/pages/comments/comments-page.component.scss

6
backend/src/Squidex.Domain.Apps.Entities.MongoDb/Rules/MongoRuleEventRepository.cs

@ -97,7 +97,11 @@ namespace Squidex.Domain.Apps.Entities.MongoDb.Rules
public async Task EnqueueAsync(RuleJob job, Instant? nextAttempt, CancellationToken ct = default)
{
var entity = SimpleMapper.Map(job, new MongoRuleEventEntity { Job = job, Created = job.Created, NextAttempt = nextAttempt });
var entity = new MongoRuleEventEntity { Job = job, Created = job.Created, NextAttempt = nextAttempt };
SimpleMapper.Map(job, entity);
entity.DocumentId = job.Id.ToString();
await Collection.InsertOneIfNotExistsAsync(entity, ct);
}

10
backend/tests/Squidex.Domain.Apps.Entities.Tests/Comments/CommentsCommandMiddlewareTests.cs

@ -141,16 +141,6 @@ namespace Squidex.Domain.Apps.Entities.Comments
return new CommandContext(command, commandBus);
}
private static bool IsForUser(ICommand command, string id)
{
return command is CreateComment createComment &&
createComment.CommentsId == id &&
createComment.Mentions == null &&
createComment.AppId == null &&
createComment.ExpectedVersion == EtagVersion.Any &&
createComment.IsMention;
}
private void SetupUser(string id, string email)
{
var user = A.Fake<IUser>();

6
frontend/app/features/content/pages/comments/comments-page.component.scss

@ -0,0 +1,6 @@
sqx-comments {
display: flex;
flex-direction: column;
flex-grow: 1;
height: 100%;
}
Loading…
Cancel
Save