From 04051ca051c61bb49f25dac54c6472159a9a267f Mon Sep 17 00:00:00 2001 From: Jake Goulding Date: Thu, 30 Nov 2023 09:45:43 -0500 Subject: [PATCH] Mark `jsonGet` and `jsonPost` as returning `unknown` This forces us to parse / validate every response. --- ui/frontend/actions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/frontend/actions.ts b/ui/frontend/actions.ts index d359d7a9f..caf87e1e4 100644 --- a/ui/frontend/actions.ts +++ b/ui/frontend/actions.ts @@ -150,13 +150,13 @@ export const reExecuteWithBacktrace = (): ThunkAction => dispatch => { type FetchArg = Parameters[0]; -export function jsonGet(url: FetchArg) { +export function jsonGet(url: FetchArg): Promise { return fetchJson(url, { method: 'get', }); } -export function jsonPost(url: FetchArg, body: Record): Promise { +export function jsonPost(url: FetchArg, body: Record): Promise { return fetchJson(url, { method: 'post', body: JSON.stringify(body),