public async Task <IActionResult> RegenerateKey() { var allApiKeys = await _apiKeyService.GetValidKeys(); _log.Info($"{allApiKeys.Count} API keys found. Regenerating them all..."); foreach (var existingApiKey in allApiKeys) { await _apiKeyService.GenerateApiKeyAsync(existingApiKey.ClientId, existingApiKey.WalletId); } return(Ok($"{allApiKeys.Count} API keys were scheduled for regeneration.")); }