From a6150c487e7a0eb3fb1d9874d2fa7de61cdbfd30 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 27 Apr 2021 19:29:20 +0800 Subject: refactor: ... --- BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs') diff --git a/BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs b/BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs index 0d4cc0a6..cabc1db2 100644 --- a/BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs +++ b/BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs @@ -93,7 +93,7 @@ namespace Timeline.Services.Api public async Task AddBookmark(long userId, long timelineId) { - if (!await _userService.CheckUserExistence(userId)) + if (!await _userService.CheckUserExistenceAsync(userId)) throw new UserNotExistException(userId); if (!await _timelineService.CheckExistence(timelineId)) @@ -115,7 +115,7 @@ namespace Timeline.Services.Api public async Task> GetBookmarks(long userId) { - if (!await _userService.CheckUserExistence(userId)) + if (!await _userService.CheckUserExistenceAsync(userId)) throw new UserNotExistException(userId); var entities = await _database.BookmarkTimelines.Where(t => t.UserId == userId).OrderBy(t => t.Rank).Select(t => new { t.TimelineId }).ToListAsync(); @@ -125,7 +125,7 @@ namespace Timeline.Services.Api public async Task IsBookmark(long userId, long timelineId, bool checkUserExistence = true, bool checkTimelineExistence = true) { - if (checkUserExistence && !await _userService.CheckUserExistence(userId)) + if (checkUserExistence && !await _userService.CheckUserExistenceAsync(userId)) throw new UserNotExistException(userId); if (checkTimelineExistence && !await _timelineService.CheckExistence(timelineId)) @@ -136,7 +136,7 @@ namespace Timeline.Services.Api public async Task MoveBookmark(long userId, long timelineId, long newPosition) { - if (!await _userService.CheckUserExistence(userId)) + if (!await _userService.CheckUserExistenceAsync(userId)) throw new UserNotExistException(userId); if (!await _timelineService.CheckExistence(timelineId)) @@ -178,7 +178,7 @@ namespace Timeline.Services.Api public async Task RemoveBookmark(long userId, long timelineId) { - if (!await _userService.CheckUserExistence(userId)) + if (!await _userService.CheckUserExistenceAsync(userId)) throw new UserNotExistException(userId); if (!await _timelineService.CheckExistence(timelineId)) -- cgit v1.2.3