2021-12-31 08:59:02 +01:00
|
|
|
using System;
|
2021-12-24 09:27:00 +01:00
|
|
|
using System.Threading.Tasks;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
|
|
namespace BTCPayServer.Controllers
|
|
|
|
{
|
2022-01-07 04:32:00 +01:00
|
|
|
public partial class UIManageController
|
2021-12-24 09:27:00 +01:00
|
|
|
{
|
|
|
|
[HttpGet]
|
|
|
|
public async Task<IActionResult> LoginCodes()
|
|
|
|
{
|
|
|
|
var user = await _userManager.GetUserAsync(User);
|
|
|
|
if (user == null)
|
|
|
|
{
|
|
|
|
throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'.");
|
|
|
|
}
|
|
|
|
|
|
|
|
return View(nameof(LoginCodes), _userLoginCodeService.GetOrGenerate(user.Id));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|