aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Services/TimelinePostService.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-04-18 22:34:06 +0800
committercrupest <crupest@outlook.com>2021-04-18 22:34:06 +0800
commitb00ee7bc9d59aa008e7d196e6a9c28b6bba307d0 (patch)
treef311a556e867bfeed5abd15dcefd0b6599c2b724 /BackEnd/Timeline/Services/TimelinePostService.cs
parentf8db4c0b058c557c79ace5823ed5ab69b42c57d2 (diff)
downloadtimeline-b00ee7bc9d59aa008e7d196e6a9c28b6bba307d0.tar.gz
timeline-b00ee7bc9d59aa008e7d196e6a9c28b6bba307d0.tar.bz2
timeline-b00ee7bc9d59aa008e7d196e6a9c28b6bba307d0.zip
fix: Fix a bug in HasPostModifyPermission.
Diffstat (limited to 'BackEnd/Timeline/Services/TimelinePostService.cs')
-rw-r--r--BackEnd/Timeline/Services/TimelinePostService.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/BackEnd/Timeline/Services/TimelinePostService.cs b/BackEnd/Timeline/Services/TimelinePostService.cs
index 88a93710..f64c4c22 100644
--- a/BackEnd/Timeline/Services/TimelinePostService.cs
+++ b/BackEnd/Timeline/Services/TimelinePostService.cs
@@ -462,7 +462,7 @@ namespace Timeline.Services
var timelineEntity = await _database.Timelines.Where(t => t.Id == timelineId).Select(t => new { t.OwnerId }).SingleAsync();
- var postEntity = await _database.TimelinePosts.Where(p => p.Id == postId).Select(p => new { p.Deleted, p.AuthorId }).SingleOrDefaultAsync();
+ var postEntity = await _database.TimelinePosts.Where(p => p.TimelineId == timelineId && p.LocalId == postId).Select(p => new { p.Deleted, p.AuthorId }).SingleOrDefaultAsync();
if (postEntity is null)
{