mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 17:22:15 +00:00
send webhook when a contest opens
This commit is contained in:
parent
3f1236f22e
commit
de6d1d15ab
1 changed files with 7 additions and 0 deletions
|
@ -276,6 +276,13 @@ public ActionResult CreateContest(CreateContestViewModel model)
|
|||
db.Contests.Add(c);
|
||||
db.SaveChanges();
|
||||
|
||||
|
||||
NotificationDaemon.ScreamToDiscord(
|
||||
"A new contest has started.",
|
||||
$@"Contest name: {c.Name}
|
||||
Ends at: {c.EndsAt}",
|
||||
Url.Action("ViewContest", new { id = c.Id })
|
||||
);
|
||||
NotificationDaemon.NotifyEveryone(User.Identity.GetUserId(), "A contest has just started.", "A new contest has been open! Contest: " + c.Name, Url.Action("ViewContest", new { id = c.Id }));
|
||||
|
||||
return RedirectToAction("ViewContest", new { id = c.Id });
|
||||
|
|
Loading…
Reference in a new issue