mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
22 lines
590 B
C#
22 lines
590 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace BTCPayServer.Controllers
|
|
{
|
|
public partial class UIManageController
|
|
{
|
|
[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));
|
|
}
|
|
}
|
|
}
|