diff options
author | crupest <crupest@outlook.com> | 2021-04-28 17:16:45 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-04-28 17:16:45 +0800 |
commit | 76ea7c9f7295f1507bc87154b36cc0f2ea22036e (patch) | |
tree | ed6e2b0e7dcad128bf9b971e74c233d23113e284 /BackEnd/Timeline/Services/Api/HighlightTimelineService.cs | |
parent | 344d189e5860a20ebe42cec03b86974a2a3aaa95 (diff) | |
download | timeline-76ea7c9f7295f1507bc87154b36cc0f2ea22036e.tar.gz timeline-76ea7c9f7295f1507bc87154b36cc0f2ea22036e.tar.bz2 timeline-76ea7c9f7295f1507bc87154b36cc0f2ea22036e.zip |
...
Diffstat (limited to 'BackEnd/Timeline/Services/Api/HighlightTimelineService.cs')
-rw-r--r-- | BackEnd/Timeline/Services/Api/HighlightTimelineService.cs | 8 |
1 files changed, 4 insertions, 4 deletions
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<bool> 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<bool> 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<bool> 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);
|