diff options
Diffstat (limited to 'BackEnd/Timeline/Services/Api')
-rw-r--r-- | BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs | 8 | ||||
-rw-r--r-- | BackEnd/Timeline/Services/Api/HighlightTimelineService.cs | 8 |
2 files changed, 8 insertions, 8 deletions
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<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);
|