From 6f7c7adced972944f5648b3714baa053037a4160 Mon Sep 17 00:00:00 2001 From: transtrike Date: Mon, 1 Feb 2021 18:28:55 +0200 Subject: GetByUsername & GetById return post Ids; Read POst returns URLs --- src/DevHive.Services/Services/PostService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/DevHive.Services/Services/PostService.cs') 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; } -- cgit v1.2.3