From 874581d4434d84f072c02da640be68fb8886ccc0 Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Sun, 14 May 2023 09:55:34 +0530 Subject: [PATCH] fix: add auth header info in for get operation --- src/utils/generate-snippets.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/generate-snippets.jsx b/src/utils/generate-snippets.jsx index f5a9fbe..8547c37 100644 --- a/src/utils/generate-snippets.jsx +++ b/src/utils/generate-snippets.jsx @@ -23,9 +23,12 @@ const response = await fetch('${url}${endpoint}', { .filter((item) => !!item) .join(',\n ')} }),` - : '' + : `headers: { + 'Authorization': 'ApiKey REPLACE_WITH_API_KEY', + }` } }); + const data = await response.json(); `, },