diff options
author | crupest <crupest@outlook.com> | 2021-04-27 18:38:26 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-04-27 18:38:26 +0800 |
commit | 2cbcd8b63bcd7e3d45cd92baa5bacd828527aea8 (patch) | |
tree | 36ef7044778eb0f660d02d08b57c4d0a143b9865 /BackEnd/Timeline/Services/DatabaseManagement/TimelinePostContentToDataMigration.cs | |
parent | deb02d10e6139bb74a63343e2a8b70fee11bec22 (diff) | |
download | timeline-2cbcd8b63bcd7e3d45cd92baa5bacd828527aea8.tar.gz timeline-2cbcd8b63bcd7e3d45cd92baa5bacd828527aea8.tar.bz2 timeline-2cbcd8b63bcd7e3d45cd92baa5bacd828527aea8.zip |
refactor: Refactor is still on...
Diffstat (limited to 'BackEnd/Timeline/Services/DatabaseManagement/TimelinePostContentToDataMigration.cs')
-rw-r--r-- | BackEnd/Timeline/Services/DatabaseManagement/TimelinePostContentToDataMigration.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BackEnd/Timeline/Services/DatabaseManagement/TimelinePostContentToDataMigration.cs b/BackEnd/Timeline/Services/DatabaseManagement/TimelinePostContentToDataMigration.cs index f9a3418b..f6662a97 100644 --- a/BackEnd/Timeline/Services/DatabaseManagement/TimelinePostContentToDataMigration.cs +++ b/BackEnd/Timeline/Services/DatabaseManagement/TimelinePostContentToDataMigration.cs @@ -35,7 +35,7 @@ namespace Timeline.Services.DatabaseManagement {
if (postEntity.ContentType == "text")
{
- var tag = await _dataManager.RetainEntry(Encoding.UTF8.GetBytes(postEntity.Content));
+ var tag = await _dataManager.RetainEntryAsync(Encoding.UTF8.GetBytes(postEntity.Content), cancellationToken);
database.TimelinePostData.Add(new TimelinePostDataEntity
{
DataTag = tag,
@@ -47,7 +47,7 @@ namespace Timeline.Services.DatabaseManagement }
else
{
- var data = await _dataManager.GetEntryAndCheck(postEntity.Content, "Old image content does not have corresponding data with the tag.");
+ var data = await _dataManager.GetEntryAndCheck(postEntity.Content, Resource.TimelinePostContentToDataMigrationImageNoData, cancellationToken);
var format = Image.DetectFormat(data);
database.TimelinePostData.Add(new TimelinePostDataEntity
{
|