From dc73899bde67f97116aaad8c77c7dc490046b215 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Thu, 17 Nov 2022 14:06:47 +0000 Subject: [PATCH] Tools: Fixed updateNews script --- packages/tools/website/updateNews.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/tools/website/updateNews.ts b/packages/tools/website/updateNews.ts index 65b70f733f..0212ed7068 100644 --- a/packages/tools/website/updateNews.ts +++ b/packages/tools/website/updateNews.ts @@ -93,6 +93,12 @@ const getPostContent = async (post: Post): Promise => { }; const execApi = async (method: HttpMethod, path: string, body: Record = null) => { + interface Request { + method: HttpMethod; + headers: Record; + body?: string; + } + const headers: Record = { 'Api-Key': config.key, 'Api-Username': config.username, @@ -100,11 +106,14 @@ const execApi = async (method: HttpMethod, path: string, body: Record