Fix external auth message showing up when its disabled

This commit is contained in:
jvyden 2021-11-24 19:44:28 -05:00
commit 8edc276767
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -30,6 +30,8 @@ namespace LBPUnion.ProjectLighthouse.Controllers
User user = await this.database.UserFromGameRequest(this.Request, true);
if (user == null) return this.StatusCode(403, "");
if (ServerSettings.Instance.UseExternalAuth)
{
return this.Ok
(
$"Please stay on this screen.\n" +
@ -40,6 +42,9 @@ namespace LBPUnion.ProjectLighthouse.Controllers
);
}
return this.Ok($"You are now logged in as {user.Username} (id: {user.UserId}).\n\n" + ServerSettings.Instance.EulaText);
}
[HttpGet("notification")]
public IActionResult Notification() => this.Ok();
/// <summary>