From 58cdd0d4efde97f5f260d538940dc9c436c54e79 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 17 Apr 2017 09:25:54 -0400 Subject: [PATCH] add a test button --- Project-Unite/Controllers/APIController.cs | 8 ++++++++ Project-Unite/Views/Admin/Index.cshtml | 2 ++ 2 files changed, 10 insertions(+) diff --git a/Project-Unite/Controllers/APIController.cs b/Project-Unite/Controllers/APIController.cs index 5767586..f21a385 100644 --- a/Project-Unite/Controllers/APIController.cs +++ b/Project-Unite/Controllers/APIController.cs @@ -4,6 +4,7 @@ using System.Web; using System.Web.Mvc; using System.Web.Script.Serialization; +using Microsoft.AspNet.Identity; using Project_Unite.Models; namespace Project_Unite.Controllers @@ -46,6 +47,13 @@ public ActionResult Skins() return Content(Serializer.Serialize(db.Skins.ToArray())); } + [Authorize] + public ActionResult TestNotification() + { + NotificationDaemon.NotifyEveryone(User.Identity.GetUserId(), "Test notification", "This is a test of the real-time notification system.", "#"); + return Content("Sent."); + } + [Authorize] public ActionResult GetNotificationCount() { diff --git a/Project-Unite/Views/Admin/Index.cshtml b/Project-Unite/Views/Admin/Index.cshtml index d282f60..78404a1 100644 --- a/Project-Unite/Views/Admin/Index.cshtml +++ b/Project-Unite/Views/Admin/Index.cshtml @@ -5,3 +5,5 @@

Wow, an actual index page.

+ +