aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Services/Api/HighlightTimelineService.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-05-05 16:18:33 +0800
committercrupest <crupest@outlook.com>2021-05-05 16:18:33 +0800
commite110f4a41bd711192af28874f71f031a130f0b84 (patch)
tree08610c5476549edfbe8e9a2605b8876e026d89f5 /BackEnd/Timeline/Services/Api/HighlightTimelineService.cs
parent2a4b59c05236028ed1dc8304327b1ef484a376db (diff)
downloadtimeline-e110f4a41bd711192af28874f71f031a130f0b84.tar.gz
timeline-e110f4a41bd711192af28874f71f031a130f0b84.tar.bz2
timeline-e110f4a41bd711192af28874f71f031a130f0b84.zip
refactor: ...
Diffstat (limited to 'BackEnd/Timeline/Services/Api/HighlightTimelineService.cs')
-rw-r--r--BackEnd/Timeline/Services/Api/HighlightTimelineService.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/BackEnd/Timeline/Services/Api/HighlightTimelineService.cs b/BackEnd/Timeline/Services/Api/HighlightTimelineService.cs
index d4367e57..eb606ae6 100644
--- a/BackEnd/Timeline/Services/Api/HighlightTimelineService.cs
+++ b/BackEnd/Timeline/Services/Api/HighlightTimelineService.cs
@@ -81,7 +81,10 @@ namespace Timeline.Services.Api
var entity = await _database.HighlightTimelines.SingleOrDefaultAsync(t => t.TimelineId == timelineId);
- if (entity == null) throw new InvalidHighlightTimelineException("You can't move a non-highlight timeline.");
+ if (entity is null)
+ {
+ throw new EntityNotExistException(EntityTypes.HighlightTimeline);
+ }
var oldPosition = entity.Order;