aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Services/DatabaseManagement/TimelinePostContentToDataMigration.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-04-27 18:38:26 +0800
committercrupest <crupest@outlook.com>2021-04-27 18:38:26 +0800
commit6c9778b55dd8367d38280c66e0f308c5332029ed (patch)
treeb59aaf0194103af93c5a0c5e4e8bfd1b414ac201 /BackEnd/Timeline/Services/DatabaseManagement/TimelinePostContentToDataMigration.cs
parenta341819711cda358652ad84b1e507d9559ecabfd (diff)
downloadtimeline-6c9778b55dd8367d38280c66e0f308c5332029ed.tar.gz
timeline-6c9778b55dd8367d38280c66e0f308c5332029ed.tar.bz2
timeline-6c9778b55dd8367d38280c66e0f308c5332029ed.zip
refactor: Refactor is still on...
Diffstat (limited to 'BackEnd/Timeline/Services/DatabaseManagement/TimelinePostContentToDataMigration.cs')
-rw-r--r--BackEnd/Timeline/Services/DatabaseManagement/TimelinePostContentToDataMigration.cs4
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
{