From 6c9778b55dd8367d38280c66e0f308c5332029ed Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 27 Apr 2021 18:38:26 +0800 Subject: refactor: Refactor is still on... --- .../Services/DatabaseManagement/TimelinePostContentToDataMigration.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'BackEnd/Timeline/Services/DatabaseManagement/TimelinePostContentToDataMigration.cs') 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 { -- cgit v1.2.3