Commit fd98225e authored by June's avatar June
Browse files

Simulated discord ID now shows which user you are when starting

parent 9371acc6
......@@ -15,6 +15,7 @@
private readonly IHostEnvironment _hostEnvironment;
private readonly UserManager<UserModel> _userManager;
private readonly SignInManager<UserModel> _signInManager;
private static ulong _simulatedDiscordId = 1;
public HomeController(
IHostEnvironment hostEnvironment,
......@@ -40,9 +41,10 @@
// Pretend to do Discord login.
var user = new UserModel
{
DiscordId = (ulong)(new Random().Next(100)),
Username = "stranger",
DiscordId = _simulatedDiscordId,
Username = "stranger" + _simulatedDiscordId,
};
_simulatedDiscordId++;
await _userManager.CreateAsync(user);
await _signInManager.SignInAsync(user, false);
return RedirectToAction(nameof(Index));
......
Supports Markdown
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