diff options
| author | transtrike <transtrike@gmail.com> | 2021-02-01 18:28:55 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-02-01 18:28:55 +0200 |
| commit | 6f7c7adced972944f5648b3714baa053037a4160 (patch) | |
| tree | cac3ca1c9b9cc98c1af84c2b46236075a1f1a2f3 /src/DevHive.Services/Services | |
| parent | 84f9eebd0895e2c23b5718ee408f056e3cf3ebb2 (diff) | |
| download | DevHive-6f7c7adced972944f5648b3714baa053037a4160.tar DevHive-6f7c7adced972944f5648b3714baa053037a4160.tar.gz DevHive-6f7c7adced972944f5648b3714baa053037a4160.zip | |
GetByUsername & GetById return post Ids; Read POst returns URLs
Diffstat (limited to 'src/DevHive.Services/Services')
| -rw-r--r-- | src/DevHive.Services/Services/PostService.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/DevHive.Services/Services/PostService.cs b/src/DevHive.Services/Services/PostService.cs index 8a37acd..3206479 100644 --- a/src/DevHive.Services/Services/PostService.cs +++ b/src/DevHive.Services/Services/PostService.cs @@ -9,6 +9,7 @@ using System.Security.Claims; using DevHive.Services.Interfaces; using DevHive.Data.Interfaces.Repositories; using System.Linq; +using Microsoft.CodeAnalysis.CSharp; namespace DevHive.Services.Services { @@ -49,6 +50,8 @@ namespace DevHive.Services.Services Post newPost = await this._postRepository .GetPostByCreatorAndTimeCreatedAsync(post.Creator.Id, post.TimeCreated); + await this._postRepository.AddNewPostToCreator(createPostServiceModel.CreatorId, newPost); + return newPost.Id; } else @@ -69,7 +72,6 @@ namespace DevHive.Services.Services readPostServiceModel.CreatorFirstName = user.FirstName; readPostServiceModel.CreatorLastName = user.LastName; readPostServiceModel.CreatorUsername = user.UserName; - // readPostServiceModel.Files = await this._cloudService.GetFilesFromCloud(post.FileUrls); return readPostServiceModel; } |
