aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Services/TimelineService.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-11-19 23:18:45 +0800
committercrupest <crupest@outlook.com>2019-11-19 23:18:45 +0800
commitf3c7912caec2e9eee8a685d8751894f357528a71 (patch)
tree66e1bcfe602877e4f72ea1b68cbf33e06557c222 /Timeline/Services/TimelineService.cs
parent2238568fdfc891d69e8174060e54845c7a3d5e95 (diff)
downloadtimeline-f3c7912caec2e9eee8a685d8751894f357528a71.tar.gz
timeline-f3c7912caec2e9eee8a685d8751894f357528a71.tar.bz2
timeline-f3c7912caec2e9eee8a685d8751894f357528a71.zip
Complete integrated tests??? Fix bugs.
Diffstat (limited to 'Timeline/Services/TimelineService.cs')
-rw-r--r--Timeline/Services/TimelineService.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Timeline/Services/TimelineService.cs b/Timeline/Services/TimelineService.cs
index 1e64353c..a2ff4098 100644
--- a/Timeline/Services/TimelineService.cs
+++ b/Timeline/Services/TimelineService.cs
@@ -605,12 +605,12 @@ namespace Timeline.Services
var timelineEntity = await Database.Timelines.Where(t => t.Id == timelineId).Select(t => new { t.OwnerId }).SingleAsync();
- var postEntity = await Database.Timelines.Where(p => p.Id == id).Select(p => new { p.OwnerId }).SingleOrDefaultAsync();
+ var postEntity = await Database.TimelinePosts.Where(p => p.Id == id).Select(p => new { p.AuthorId }).SingleOrDefaultAsync();
if (postEntity == null)
throw new TimelinePostNotExistException(id);
- return timelineEntity.OwnerId == userId || postEntity.OwnerId == userId;
+ return timelineEntity.OwnerId == userId || postEntity.AuthorId == userId;
}
public async Task<bool> IsMemberOf(string name, string username)