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
commit7d54e0b8b7ca84488fdcba90c68169a85b4d45c6 (patch)
treecf2fa58eef25e5bf871d8a71b15ac6694e357b54 /BackEnd/Timeline/Services/Api/HighlightTimelineService.cs
parent51e1205d3a9c72a5734a842536630cea69359107 (diff)
downloadtimeline-7d54e0b8b7ca84488fdcba90c68169a85b4d45c6.tar.gz
timeline-7d54e0b8b7ca84488fdcba90c68169a85b4d45c6.tar.bz2
timeline-7d54e0b8b7ca84488fdcba90c68169a85b4d45c6.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;