mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
Co-authored-by: Dennis Reimann <mail@dennisreimann.de> Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
22 lines
591 B
C#
22 lines
591 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace BTCPayServer.Controllers
|
|
{
|
|
public partial class ManageController
|
|
{
|
|
[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));
|
|
}
|
|
}
|
|
}
|