Commit 266dd413 authored by Clint.Network's avatar Clint.Network

Prevent ReCaptcha Bypass

parent fc7d068c
......@@ -97,8 +97,10 @@ namespace Stratis.Guru.Controllers
if (ModelState.IsValid)
{
var lastDraw = _draws.GetLastDraw();
HttpContext.Session.SetString("HaveBeginParticipation", "true");
return RedirectToAction("Participate", new{id=lastDraw});
}
ViewBag.NextDraw = long.Parse(_memoryCache.Get("NextDraw").ToString());
ViewBag.Jackpot = _memoryCache.Get("Jackpot");
ViewBag.Players = _participation.GetPlayers(_draws.GetLastDraw());
......@@ -106,10 +108,13 @@ namespace Stratis.Guru.Controllers
return View("Lottery");
}
[HttpGet]
[Route("lottery/participate/{id}")]
public IActionResult Participate(string id)
{
if(HttpContext.Session.GetString("HaveBeginParticipation") == null)
{
return RedirectToAction("Lottery");
}
ViewBag.NextDraw = long.Parse(_memoryCache.Get("NextDraw").ToString());
ViewBag.Jackpot = _memoryCache.Get("Jackpot");
ViewBag.Players = _participation.GetPlayers(_draws.GetLastDraw());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment