diff options
author | crupest <crupest@outlook.com> | 2021-01-03 19:38:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-03 19:38:05 +0800 |
commit | 418d631528fdb581a384068719e9af5dbaa66740 (patch) | |
tree | 42e2c0396a16cb5fbaaae665a238a8a031bef7f0 /BackEnd/Timeline/Services/BookmarkTimelineService.cs | |
parent | 4b3ae3edd9e8aceac5ff26ef137d2a8d686fe305 (diff) | |
parent | 8af803cb0da57af1355ad28cd056cb5dcf6d6915 (diff) | |
download | timeline-418d631528fdb581a384068719e9af5dbaa66740.tar.gz timeline-418d631528fdb581a384068719e9af5dbaa66740.tar.bz2 timeline-418d631528fdb581a384068719e9af5dbaa66740.zip |
Merge pull request #197 from crupest/front-dev
Front: Highlight and bookmark timeline and new home page.
Diffstat (limited to 'BackEnd/Timeline/Services/BookmarkTimelineService.cs')
-rw-r--r-- | BackEnd/Timeline/Services/BookmarkTimelineService.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Services/BookmarkTimelineService.cs b/BackEnd/Timeline/Services/BookmarkTimelineService.cs index 09438193..2ec3af62 100644 --- a/BackEnd/Timeline/Services/BookmarkTimelineService.cs +++ b/BackEnd/Timeline/Services/BookmarkTimelineService.cs @@ -94,6 +94,11 @@ namespace Timeline.Services var timelineId = await _timelineService.GetTimelineIdByName(timelineName);
+ if (await _database.BookmarkTimelines.SingleOrDefaultAsync(t => t.TimelineId == timelineId) is not null)
+ {
+ return;
+ }
+
_database.BookmarkTimelines.Add(new BookmarkTimelineEntity
{
TimelineId = timelineId,
|