From ffd50da0e45df6d1c5c27bff4a5b459f201fd7ef Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 28 Apr 2021 17:16:45 +0800 Subject: ... --- BackEnd/Timeline/Services/Api/HighlightTimelineService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'BackEnd/Timeline/Services/Api/HighlightTimelineService.cs') diff --git a/BackEnd/Timeline/Services/Api/HighlightTimelineService.cs b/BackEnd/Timeline/Services/Api/HighlightTimelineService.cs index 419aa68d..8224f1fe 100644 --- a/BackEnd/Timeline/Services/Api/HighlightTimelineService.cs +++ b/BackEnd/Timeline/Services/Api/HighlightTimelineService.cs @@ -92,7 +92,7 @@ namespace Timeline.Services.Api public async Task AddHighlightTimeline(long timelineId, long? operatorId) { - if (!await _timelineService.CheckExistence(timelineId)) + if (!await _timelineService.CheckTimelineExistenceAsync(timelineId)) throw new TimelineNotExistException(timelineId); if (operatorId.HasValue && !await _userService.CheckUserExistenceAsync(operatorId.Value)) @@ -118,7 +118,7 @@ namespace Timeline.Services.Api public async Task RemoveHighlightTimeline(long timelineId, long? operatorId) { - if (!await _timelineService.CheckExistence(timelineId)) + if (!await _timelineService.CheckTimelineExistenceAsync(timelineId)) throw new TimelineNotExistException(timelineId); if (operatorId.HasValue && !await _userService.CheckUserExistenceAsync(operatorId.Value)) @@ -146,7 +146,7 @@ namespace Timeline.Services.Api public async Task MoveHighlightTimeline(long timelineId, long newPosition) { - if (!await _timelineService.CheckExistence(timelineId)) + if (!await _timelineService.CheckTimelineExistenceAsync(timelineId)) throw new TimelineNotExistException(timelineId); var entity = await _database.HighlightTimelines.SingleOrDefaultAsync(t => t.TimelineId == timelineId); @@ -185,7 +185,7 @@ namespace Timeline.Services.Api public async Task IsHighlightTimeline(long timelineId, bool checkTimelineExistence = true) { - if (checkTimelineExistence && !await _timelineService.CheckExistence(timelineId)) + if (checkTimelineExistence && !await _timelineService.CheckTimelineExistenceAsync(timelineId)) throw new TimelineNotExistException(timelineId); return await _database.HighlightTimelines.AnyAsync(t => t.TimelineId == timelineId); -- cgit v1.2.3