From 93110d997208e72a8e23a3e296562ee6ea37c167 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Wed, 28 Dec 2022 15:00:14 -0500 Subject: [PATCH] refactoring --- .../Controllers/MigrationController.cs | 22 +------------------ src/BirdsiteLive/Models/MigrationData.cs | 21 ++++++++++++++++++ .../Views/Migration/Delete.cshtml | 2 +- src/BirdsiteLive/Views/Migration/Index.cshtml | 2 +- 4 files changed, 24 insertions(+), 23 deletions(-) create mode 100644 src/BirdsiteLive/Models/MigrationData.cs diff --git a/src/BirdsiteLive/Controllers/MigrationController.cs b/src/BirdsiteLive/Controllers/MigrationController.cs index 386644a..0261876 100644 --- a/src/BirdsiteLive/Controllers/MigrationController.cs +++ b/src/BirdsiteLive/Controllers/MigrationController.cs @@ -7,6 +7,7 @@ using Npgsql.TypeHandlers; using BirdsiteLive.Domain; using BirdsiteLive.Domain.Enum; using BirdsiteLive.DAL.Contracts; +using BirdsiteLive.Models; namespace BirdsiteLive.Controllers { @@ -213,25 +214,4 @@ namespace BirdsiteLive.Controllers return StatusCode(400); } } - - - - public class MigrationData - { - public string Acct { get; set; } - - public string FediverseAccount { get; set; } - public string TweetId { get; set; } - - public string MigrationCode { get; set; } - - public bool IsTweetProvided { get; set; } - public bool IsAcctProvided { get; set; } - - public bool IsTweetValid { get; set; } - public bool IsAcctValid { get; set; } - - public string ErrorMessage { get; set; } - public bool MigrationSuccess { get; set; } - } } diff --git a/src/BirdsiteLive/Models/MigrationData.cs b/src/BirdsiteLive/Models/MigrationData.cs new file mode 100644 index 0000000..77185f9 --- /dev/null +++ b/src/BirdsiteLive/Models/MigrationData.cs @@ -0,0 +1,21 @@ +namespace BirdsiteLive.Models +{ + public class MigrationData + { + public string Acct { get; set; } + + public string FediverseAccount { get; set; } + public string TweetId { get; set; } + + public string MigrationCode { get; set; } + + public bool IsTweetProvided { get; set; } + public bool IsAcctProvided { get; set; } + + public bool IsTweetValid { get; set; } + public bool IsAcctValid { get; set; } + + public string ErrorMessage { get; set; } + public bool MigrationSuccess { get; set; } + } +} \ No newline at end of file diff --git a/src/BirdsiteLive/Views/Migration/Delete.cshtml b/src/BirdsiteLive/Views/Migration/Delete.cshtml index 9df9f62..568b08a 100644 --- a/src/BirdsiteLive/Views/Migration/Delete.cshtml +++ b/src/BirdsiteLive/Views/Migration/Delete.cshtml @@ -1,4 +1,4 @@ -@model BirdsiteLive.Controllers.MigrationData +@model MigrationData @{ ViewData["Title"] = "Migration"; } diff --git a/src/BirdsiteLive/Views/Migration/Index.cshtml b/src/BirdsiteLive/Views/Migration/Index.cshtml index 670a209..2d1db53 100644 --- a/src/BirdsiteLive/Views/Migration/Index.cshtml +++ b/src/BirdsiteLive/Views/Migration/Index.cshtml @@ -1,4 +1,4 @@ -@model BirdsiteLive.Controllers.MigrationData +@model MigrationData @{ ViewData["Title"] = "Migration"; }