Browse Source

Resolved #979: Make Post.CreatorId nullable

pull/988/head
Halil ibrahim Kalkan 8 years ago
parent
commit
9056cd2bf8
  1. 2
      modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs
  2. 2
      modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/Posts/Post.cs

2
modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs

@ -156,7 +156,7 @@ namespace Volo.Blogging.Posts
var post = new Post(
id: GuidGenerator.Create(),
blogId: input.BlogId,
creatorId: CurrentUser.GetId(),
creatorId: CurrentUser.Id,
title: input.Title,
coverImage: input.CoverImage,
url: input.Url

2
modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/Posts/Post.cs

@ -33,7 +33,7 @@ namespace Volo.Blogging.Posts
}
public Post(Guid id, Guid blogId, Guid creatorId, [NotNull] string title, [NotNull] string coverImage, [NotNull] string url)
public Post(Guid id, Guid blogId, Guid? creatorId, [NotNull] string title, [NotNull] string coverImage, [NotNull] string url)
{
Id = id;
CreatorId = creatorId;

Loading…
Cancel
Save