private static ContentResult generateBadRequestLogin(string message) { BasicTemplater.errors.Add(message); var toReturn = new ContentResult { ContentType = "text/html", StatusCode = Status400BadRequest, Content = BasicTemplater.GenerateLoginPage() }; return(toReturn); }
public async Task <IActionResult> GetLoginPage() { await CheckSessionForUser(); if (user == null) { return(new ContentResult() { Content = BasicTemplater.GenerateLoginPage(), StatusCode = Status200OK, ContentType = "text/html" }); } return(new ContentResult() { Content = $"User: {user.username}" }); }