mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 11:21:47 -05:00
add a test button
This commit is contained in:
parent
41ced12e3b
commit
58cdd0d4ef
2 changed files with 10 additions and 0 deletions
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue