fix intro UI not showing secret key after registration, fix file system watchers not starting automatically initially

This commit is contained in:
Stanley Dimant
2022-07-10 20:23:02 +02:00
parent 77d3828f86
commit d338b4b93c
5 changed files with 11 additions and 7 deletions

View File

@@ -18,14 +18,18 @@ namespace MareSynchronos.WebAPI
await CreateConnections();
}
public async Task Register()
public async Task Register(bool isIntroUi = false)
{
if (!ServerAlive) return;
Logger.Debug("Registering at service " + ApiUri);
var response = await _userHub!.InvokeAsync<string>(UserHubAPI.InvokeRegister);
_pluginConfiguration.ClientSecret[ApiUri] = response;
_pluginConfiguration.Save();
RegisterFinalized?.Invoke();
if (!isIntroUi)
{
RegisterFinalized?.Invoke();
}
await CreateConnections();
}