This commit is contained in:
henrydays 2019-04-08 20:18:51 +01:00
parent 52be11e520
commit 75fc88904f
1 changed files with 15 additions and 10 deletions

View File

@ -26,30 +26,35 @@ namespace api.Controllers
[HttpGet("/jogoenei")] [HttpGet("/jogoenei")]
[AllowAnonymous] [AllowAnonymous]
public IActionResult jogoENEI(){
return View("Views/Landing/jogo.cshtml"); public IActionResult jogoENEI()
{
return View("Views/Landing/jogo.cshtml");
} }
[HttpGet("/level1ctf")] [HttpGet("/level1ctf")]
[AllowAnonymous] [AllowAnonymous]
public IActionResult level1() public IActionResult level1()
{ {
return View("Views/Landing/1stpage.cshtml"); return View("Views/Landing/1stpage.cshtml");
} }
[AllowAnonymous]
[AllowAnonymous]
[HttpGet("")] [HttpGet("")]
public IActionResult landingPage() public IActionResult landingPage()
{ {
return View("Views/Landing/index.cshtml"); return View("Views/Landing/index.cshtml");
} }
[AllowAnonymous] [AllowAnonymous]
[HttpGet("/reset/{user}")] [HttpGet("/reset/{user}")]
public async Task<IActionResult> resetPassword(string user) public async Task<IActionResult> resetPassword(string user)
{ {
using (var client = new HttpClient()) using (var client = new HttpClient())
{ {
try try
@ -58,7 +63,7 @@ namespace api.Controllers
// client.DefaultRequestHeaders.Add("Authorization", "Bearer " + a.token); // client.DefaultRequestHeaders.Add("Authorization", "Bearer " + a.token);
var response = await client.GetStringAsync(url); var response = await client.GetStringAsync(url);
return View("Views/Landing/resetPage.cshtml"); return View("Views/Landing/resetPage.cshtml");
} }
catch (HttpRequestException a) catch (HttpRequestException a)
@ -91,7 +96,7 @@ namespace api.Controllers
} }
[AllowAnonymous] [AllowAnonymous]
[Route("{*url}", Order = 999)] [Route("{*url}", Order = 999)]
public IActionResult CatchAll() public IActionResult CatchAll()
{ {