From 793998ac422d7fe11a861562ad808df990cc4bce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sun, 16 Aug 2020 21:38:22 +0300 Subject: [PATCH] Use CmsUserLookupServiceGetByIdAsync instead of FindByIdAsync. --- .../CmsKit/Public/Comments/CommentPublicAppService.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Comments/CommentPublicAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Comments/CommentPublicAppService.cs index b003382b56..88bcef9a1e 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Comments/CommentPublicAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Comments/CommentPublicAppService.cs @@ -42,13 +42,7 @@ namespace Volo.CmsKit.Public.Comments [Authorize] public virtual async Task CreateAsync(string entityType, string entityId, CreateCommentInput input) { - var user = await CmsUserLookupService.FindByIdAsync(CurrentUser.GetId()); - - if (user == null) - { - //TODO: Localize - throw new BusinessException(message: "User Not found!"); - } + var user = await CmsUserLookupService.GetByIdAsync(CurrentUser.GetId()); var comment = await CommentRepository.InsertAsync( new Comment(