From 18c59fe20a54acd99157776e620e2629d6795fa4 Mon Sep 17 00:00:00 2001 From: Orkun Tokdemir Date: Tue, 4 Jun 2024 10:19:23 +0200 Subject: [PATCH] Remove hard-coded API key Change-Id: Iff00d719e55d000d25846f0a1a070ced3b197c88 Reviewed-by: Marcus Tillmanns --- src/commands/online-docs.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/commands/online-docs.ts b/src/commands/online-docs.ts index f74710f..9564149 100644 --- a/src/commands/online-docs.ts +++ b/src/commands/online-docs.ts @@ -83,8 +83,7 @@ async function search() { } async function searchAndAskforResult(value: string) { try { - const searchLink = - 'https://www.googleapis.com/customsearch/v1/siterestrict?fields=items(link,snippet,title)&cx=047283ffa7d25323e&key=AIzaSyCZJjNXt7smIy62zupDA-d60EgTFtxwih4&num=10&siteSearch=doc.qt.io%2F*&siteSearchFilter=i&q='; + const searchLink = 'https://d24zn9cw9ofw9u.cloudfront.net?q='; const searchResponse = await fetch(searchLink + value); if (!searchResponse.ok) { throw new Error('Network response: ' + searchResponse.status);