mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-20 13:34:37 +01:00
API: Fix behaviour after first admin signup (#2150)
Without updating the `FirstRun` setting it is not possible to login after signing up via the API. Otherwise the `HomeController.Index` action always redirects to the Registration page.
This commit is contained in:
parent
5f46b48d45
commit
e48d18279c
1 changed files with 4 additions and 0 deletions
|
@ -153,6 +153,10 @@ namespace BTCPayServer.Controllers.GreenField
|
|||
await _userManager.AddToRoleAsync(user, Roles.ServerAdmin);
|
||||
if (!anyAdmin)
|
||||
{
|
||||
var settings = await _settingsRepository.GetSettingAsync<ThemeSettings>();
|
||||
settings.FirstRun = false;
|
||||
await _settingsRepository.UpdateSetting(settings);
|
||||
|
||||
await _settingsRepository.FirstAdminRegistered(policies, _options.UpdateUrl != null, _options.DisableRegistration);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue