public async Task <IActionResult> Get() { try { var key = _apiKeyService.GenerateApiKey(); await _apiKeyService.StoreApiKey(key); return(Ok(key.Key)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }