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
commit0ff98dd9274485994b11d9d00f4b647a5f2d42ac (patch)
tree66e1bcfe602877e4f72ea1b68cbf33e06557c222 /Timeline/Services/TimelineService.cs
parent0ff55237330279e5df6cd2838e4b90507d3542a6 (diff)
downloadtimeline-0ff98dd9274485994b11d9d00f4b647a5f2d42ac.tar.gz
timeline-0ff98dd9274485994b11d9d00f4b647a5f2d42ac.tar.bz2
timeline-0ff98dd9274485994b11d9d00f4b647a5f2d42ac.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)