From 76ea7c9f7295f1507bc87154b36cc0f2ea22036e Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 28 Apr 2021 17:16:45 +0800 Subject: ... --- BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs | 8 ++++---- BackEnd/Timeline/Services/Api/HighlightTimelineService.cs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'BackEnd/Timeline/Services/Api') diff --git a/BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs b/BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs index cabc1db2..37b55199 100644 --- a/BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs +++ b/BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs @@ -96,7 +96,7 @@ namespace Timeline.Services.Api if (!await _userService.CheckUserExistenceAsync(userId)) throw new UserNotExistException(userId); - if (!await _timelineService.CheckExistence(timelineId)) + if (!await _timelineService.CheckTimelineExistenceAsync(timelineId)) throw new TimelineNotExistException(timelineId); if (await _database.BookmarkTimelines.AnyAsync(t => t.TimelineId == timelineId && t.UserId == userId)) @@ -128,7 +128,7 @@ namespace Timeline.Services.Api if (checkUserExistence && !await _userService.CheckUserExistenceAsync(userId)) throw new UserNotExistException(userId); - if (checkTimelineExistence && !await _timelineService.CheckExistence(timelineId)) + if (checkTimelineExistence && !await _timelineService.CheckTimelineExistenceAsync(timelineId)) throw new TimelineNotExistException(timelineId); return await _database.BookmarkTimelines.AnyAsync(b => b.TimelineId == timelineId && b.UserId == userId); @@ -139,7 +139,7 @@ namespace Timeline.Services.Api if (!await _userService.CheckUserExistenceAsync(userId)) throw new UserNotExistException(userId); - if (!await _timelineService.CheckExistence(timelineId)) + if (!await _timelineService.CheckTimelineExistenceAsync(timelineId)) throw new TimelineNotExistException(timelineId); var entity = await _database.BookmarkTimelines.SingleOrDefaultAsync(t => t.TimelineId == timelineId && t.UserId == userId); @@ -181,7 +181,7 @@ namespace Timeline.Services.Api if (!await _userService.CheckUserExistenceAsync(userId)) throw new UserNotExistException(userId); - if (!await _timelineService.CheckExistence(timelineId)) + if (!await _timelineService.CheckTimelineExistenceAsync(timelineId)) throw new TimelineNotExistException(timelineId); var entity = await _database.BookmarkTimelines.SingleOrDefaultAsync(t => t.UserId == userId && t.TimelineId == timelineId); 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