Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix

Joshen Lim0c23fd0f3fdd
diff --git a/studio/lib/integration-utils.ts b/studio/lib/integration-utils.ts
index 141687061c8..c0453e7e1b1 100644
--- a/studio/lib/integration-utils.ts
+++ b/studio/lib/integration-utils.ts
@@ -1,4 +1,6 @@
-async function fetchGitHub(url: string, responseJson = true) {
+import { SupaResponseV2 } from 'types'
+
+async function fetchGitHub<T>(url: string, responseJson = true): Promise<SupaResponseV2<T>> {
const response = await fetch(url)
if (!response.ok) {
return {
@@ -10,7 +12,7 @@ async function fetchGitHub(url: string, responseJson = true) {
}
}
try {
- return responseJson ? await response.json() : await response.text()
+ return (responseJson ? await response.json() : await response.text()) as T
} catch (error: any) {
return {
error: {