add a test button

This commit is contained in:
Michael 2017-04-17 09:25:54 -04:00
parent 41ced12e3b
commit 58cdd0d4ef
2 changed files with 10 additions and 0 deletions

View file

@ -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()
{

View file

@ -5,3 +5,5 @@
<p>Wow, an actual index page.</p>
<button class="btn btn-default" onclick="$.ajax({url:'/API/TestNotification'})">Send test notification.</button>