aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Data/Repositories/PostRepository.cs
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2021-01-28 20:20:41 +0200
committerSyndamia <kamen.d.mladenov@protonmail.com>2021-01-28 20:20:41 +0200
commit702e947c20cbdc2c5aaacfa0e8172bfc97912dd2 (patch)
tree4b2569ff82383658cd3e8dc3c8fa91c8785337a0 /src/DevHive.Data/Repositories/PostRepository.cs
parent9fd19d0c584fb07107319d07c9a5b571a4ab47dd (diff)
downloadDevHive-702e947c20cbdc2c5aaacfa0e8172bfc97912dd2.tar
DevHive-702e947c20cbdc2c5aaacfa0e8172bfc97912dd2.tar.gz
DevHive-702e947c20cbdc2c5aaacfa0e8172bfc97912dd2.zip
Updated comments and posts to use Creator.Id, rather than CreatorId; updated service to give Posts and Comments the post and creator objects from db
Diffstat (limited to 'src/DevHive.Data/Repositories/PostRepository.cs')
-rw-r--r--src/DevHive.Data/Repositories/PostRepository.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/DevHive.Data/Repositories/PostRepository.cs b/src/DevHive.Data/Repositories/PostRepository.cs
index e8180de..67988f2 100644
--- a/src/DevHive.Data/Repositories/PostRepository.cs
+++ b/src/DevHive.Data/Repositories/PostRepository.cs
@@ -27,7 +27,7 @@ namespace DevHive.Data.Repositories
public async Task<Post> GetPostByCreatorAndTimeCreatedAsync(Guid creatorId, DateTime timeCreated)
{
return await this._context.Posts
- .FirstOrDefaultAsync(p => p.CreatorId == creatorId &&
+ .FirstOrDefaultAsync(p => p.Creator.Id == creatorId &&
p.TimeCreated == timeCreated);
}
#endregion