diff --git a/Project-Unite/Global.asax.cs b/Project-Unite/Global.asax.cs index a9ee5ca..2b23462 100644 --- a/Project-Unite/Global.asax.cs +++ b/Project-Unite/Global.asax.cs @@ -26,6 +26,8 @@ namespace Project_Unite BundleConfig.RegisterBundles(BundleTable.Bundles); } + + protected void Application_BeginRequest(object sender, EventArgs e) { var configuration = new Migrations.Configuration(); diff --git a/Project-Unite/Models/AdminViewModels.cs b/Project-Unite/Models/AdminViewModels.cs index 7a24aec..5e4d562 100644 --- a/Project-Unite/Models/AdminViewModels.cs +++ b/Project-Unite/Models/AdminViewModels.cs @@ -92,4 +92,13 @@ namespace Project_Unite.Models Moderator, User } + + public class Configuration + { + public string Id { get; set; } + public string SiteName { get; set; } + public string ReturnEmail { get; set; } + public string UniteBotToken { get; set; } + public string DiscordChannelId { get; set; } + } } \ No newline at end of file diff --git a/Project-Unite/Models/IdentityModels.cs b/Project-Unite/Models/IdentityModels.cs index 8b1730e..cb832da 100644 --- a/Project-Unite/Models/IdentityModels.cs +++ b/Project-Unite/Models/IdentityModels.cs @@ -194,6 +194,7 @@ namespace Project_Unite.Models return new ApplicationDbContext(); } + public DbSet Configs { get; set; } public DbSet ShiftoriumUpgrades { get; set; } public DbSet Notifications { get; set; } public DbSet Follows { get; set; } diff --git a/Project-Unite/NotificationDaemon.cs b/Project-Unite/NotificationDaemon.cs index 0d63944..25d384a 100644 --- a/Project-Unite/NotificationDaemon.cs +++ b/Project-Unite/NotificationDaemon.cs @@ -8,6 +8,8 @@ namespace Project_Unite { public static class NotificationDaemon { + public static Action OnBroadcast; + public static void NotifyFollowers(string uid, string title, string desc, string url) { var db = new ApplicationDbContext(); diff --git a/Project-Unite/Project-Unite.csproj b/Project-Unite/Project-Unite.csproj index a8676af..9b0f4d9 100644 --- a/Project-Unite/Project-Unite.csproj +++ b/Project-Unite/Project-Unite.csproj @@ -106,6 +106,18 @@ True + + ..\packages\Nito.AsyncEx.3.0.1\lib\net45\Nito.AsyncEx.dll + True + + + ..\packages\Nito.AsyncEx.3.0.1\lib\net45\Nito.AsyncEx.Concurrent.dll + True + + + ..\packages\Nito.AsyncEx.3.0.1\lib\net45\Nito.AsyncEx.Enlightenment.dll + True + @@ -169,9 +181,6 @@ - - ..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll - ..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll