1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Fixed invalid ViewBag title assignment

This commit is contained in:
Uncled1023 2022-05-22 19:30:55 -07:00
parent 9d03d03860
commit 855fcbc7e1
3 changed files with 4 additions and 4 deletions

View File

@ -60,7 +60,7 @@ namespace Teknik.IdentityServer.Controllers
[HttpGet]
public async Task<IActionResult> Login(string returnUrl)
{
ViewBag.Title = $"Sign in";
ViewBag.Title = "Sign in";
// build a model so we know what to show on the login page
var vm = await _account.BuildLoginViewModelAsync(returnUrl);

View File

@ -153,10 +153,10 @@ namespace Teknik.IdentityServer.Controllers
ViewBag.Title = "Identity Error";
ViewBag.Description = "The Identity Service threw an error";
LogError(LogLevel.Error, "Identity Error: " + message.Error);
LogError(LogLevel.Error, "Identity Error: " + message?.Error);
IdentityErrorViewModel model = new IdentityErrorViewModel();
model.Title = message.Error;
model.Title = message?.Error;
model.Description = message.ErrorDescription;
return GenerateActionResult(CreateErrorObj("Http", StatusCodes.Status500InternalServerError, message.Error), View("~/Views/Error/IdentityError.cshtml", model));

View File

@ -57,7 +57,7 @@ namespace Teknik.Areas.Error.Controllers
[TrackPageView]
public IActionResult HttpGeneral(int statusCode)
{
ViewBag.Title = statusCode;
ViewBag.Title = statusCode.ToString();
LogError(LogLevel.Error, "HTTP Error Code: " + statusCode);