diff options
author | crupest <crupest@outlook.com> | 2021-05-05 16:18:33 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-05-05 16:18:33 +0800 |
commit | 7d54e0b8b7ca84488fdcba90c68169a85b4d45c6 (patch) | |
tree | cf2fa58eef25e5bf871d8a71b15ac6694e357b54 /BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs | |
parent | 51e1205d3a9c72a5734a842536630cea69359107 (diff) | |
download | timeline-7d54e0b8b7ca84488fdcba90c68169a85b4d45c6.tar.gz timeline-7d54e0b8b7ca84488fdcba90c68169a85b4d45c6.tar.bz2 timeline-7d54e0b8b7ca84488fdcba90c68169a85b4d45c6.zip |
refactor: ...
Diffstat (limited to 'BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs')
-rw-r--r-- | BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs b/BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs index de70a9db..9d6ec93f 100644 --- a/BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs +++ b/BackEnd/Timeline/Services/Api/BookmarkTimelineService.cs @@ -68,7 +68,10 @@ namespace Timeline.Services.Api var entity = await _database.BookmarkTimelines.SingleOrDefaultAsync(t => t.TimelineId == timelineId && t.UserId == userId);
- if (entity == null) throw new InvalidBookmarkException("You can't move a non-bookmark timeline.");
+ if (entity is null)
+ {
+ throw new EntityNotExistException(EntityTypes.BookmarkTimeline);
+ }
var oldPosition = entity.Rank;
|