diff --git a/Project-Unite/Controllers/AdminController.cs b/Project-Unite/Controllers/AdminController.cs index 8b424ad..f5b3041 100644 --- a/Project-Unite/Controllers/AdminController.cs +++ b/Project-Unite/Controllers/AdminController.cs @@ -145,7 +145,7 @@ public ActionResult BackupAssets() string backupname = backupServerDir + "\\ShiftOS-" + DateTime.Now.ToString() + ".sql"; const string sqlCommand = @"BACKUP DATABASE [{0}] TO DISK = N'{1}' WITH NOFORMAT, NOINIT, NAME = N'ShiftOS Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10"; int path = db.Database.ExecuteSqlCommand(System.Data.Entity.TransactionalBehavior.DoNotEnsureTransaction, string.Format(sqlCommand, db.Database.Connection.Database, backupname)); - var backupData = new DatabaseBackup(); + var backupData = new AssetBackup(); backupData.Id = Guid.NewGuid().ToString(); backupData.UserId = User.Identity.GetUserId(); backupData.DownloadUrl = backupUrl; diff --git a/Project-Unite/Models/IdentityModels.cs b/Project-Unite/Models/IdentityModels.cs index ced6fc3..32d3d76 100644 --- a/Project-Unite/Models/IdentityModels.cs +++ b/Project-Unite/Models/IdentityModels.cs @@ -205,7 +205,7 @@ public static ApplicationDbContext Create() } public DbSet Backups { get; set; } - public DbSet AssetBackups { get; set; } + public DbSet AssetBackups { get; set; } public DbSet UserAvatars { get; set; } public DbSet Skins { get; set; } public DbSet Configs { get; set; } @@ -288,4 +288,12 @@ public class DatabaseBackup public string UserId { get; set; } public string DownloadUrl { get; set; } } + + public class AssetBackup + { + public string Id { get; set; } + public DateTime Timestamp { get; set; } + public string UserId { get; set; } + public string DownloadUrl { get; set; } + } } \ No newline at end of file diff --git a/Project-Unite/Models/ManageViewModels.cs b/Project-Unite/Models/ManageViewModels.cs index d8a1497..dc201c8 100644 --- a/Project-Unite/Models/ManageViewModels.cs +++ b/Project-Unite/Models/ManageViewModels.cs @@ -17,7 +17,7 @@ public class IndexViewModel public class BackupViewModel { public IEnumerable Databases { get; set; } - public IEnumerable AssetFolders { get; set; } + public IEnumerable AssetFolders { get; set; } } public class ManageLoginsViewModel