From 01c9ac0e13e959bae9ab221cd0a724a70c222772 Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 1 Nov 2024 03:42:38 +0000 Subject: Implement posting threads (#6049) * Implement posting a thread Co-authored-by: Dan Abramov * Fix native build * Remove dependency on web crypto API * Fix unrelated TS error (wtf) --------- Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com> --- src/lib/api/feed/custom.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/lib/api/feed') diff --git a/src/lib/api/feed/custom.ts b/src/lib/api/feed/custom.ts index c5e0a35f5..dbb02467f 100644 --- a/src/lib/api/feed/custom.ts +++ b/src/lib/api/feed/custom.ts @@ -128,7 +128,9 @@ async function loggedOutFetch({ headers: {'Accept-Language': contentLangs, ...labelersHeader}, }, ) - let data = res.ok ? jsonStringToLex(await res.text()) : null + let data = res.ok + ? (jsonStringToLex(await res.text()) as GetCustomFeed.OutputSchema) + : null if (data?.feed?.length) { return { success: true, @@ -143,7 +145,9 @@ async function loggedOutFetch({ }&limit=${limit}`, {method: 'GET', headers: {'Accept-Language': '', ...labelersHeader}}, ) - data = res.ok ? jsonStringToLex(await res.text()) : null + data = res.ok + ? (jsonStringToLex(await res.text()) as GetCustomFeed.OutputSchema) + : null if (data?.feed?.length) { return { success: true, -- cgit 1.4.1