Skip to content

Commit

Permalink
refactor: refactor ContentRow into a record in place of a class
Browse files Browse the repository at this point in the history
  • Loading branch information
andresmoschini committed Jan 27, 2022
1 parent c303180 commit 8fa1d69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
10 changes: 1 addition & 9 deletions Doppler.HtmlEditorApi/Infrastructure/ContentRow.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
using Doppler.HtmlEditorApi.Model;

public class ContentRow
{
public string Content { get; set; }
public string Meta { get; set; }
public int IdCampaign { get; set; }
public int EditorType { get; set; }
}
public record ContentRow(string content, string meta, int idCampaign, int editorType);
4 changes: 2 additions & 2 deletions Doppler.HtmlEditorApi/Infrastructure/Repository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ public async Task<CampaignContent> GetCampaignModel(string accountName, int camp
return null;
}

using var doc = JsonDocument.Parse(result.Meta);
using var doc = JsonDocument.Parse(result.meta);

return new CampaignContent(
meta: doc.RootElement,
htmlContent: result.Content);
htmlContent: result.content);
}
}

Expand Down

0 comments on commit 8fa1d69

Please sign in to comment.