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 | 6c9778b55dd8367d38280c66e0f308c5332029ed (patch) | |
tree | b59aaf0194103af93c5a0c5e4e8bfd1b414ac201 /BackEnd/Timeline/Services/DatabaseManagement/TimelinePostContentToDataMigration.cs | |
parent | a341819711cda358652ad84b1e507d9559ecabfd (diff) | |
download | timeline-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.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
{
|