From b00ee7bc9d59aa008e7d196e6a9c28b6bba307d0 Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 18 Apr 2021 22:34:06 +0800 Subject: fix: Fix a bug in HasPostModifyPermission. --- BackEnd/Timeline/Services/TimelinePostService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BackEnd/Timeline/Services/TimelinePostService.cs') 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) { -- cgit v1.2.3