nits supabase

This commit is contained in:
Ruben Fiszel
2023-07-27 17:54:07 +02:00
parent 13e38ebb52
commit d1bdc68408
4 changed files with 51 additions and 4 deletions
+5
View File
@@ -19,6 +19,11 @@
"token_url": "https://slack.com/api/oauth.access",
"scopes": ["chat:write:user", "users:read", "users:read.email"]
},
"supabase_management": {
"auth_url": "https://api.supabase.com/v1/oauth/authorize",
"token_url": "https://api.supabase.com/v1/oauth/token",
"scopes": ["all"]
},
"gsheets": {
"auth_url": "https://accounts.google.com/o/oauth2/v2/auth",
"token_url": "https://oauth2.googleapis.com/token",
-1
View File
@@ -2516,7 +2516,6 @@ async fn test_flow_lock_all(db: Pool<Postgres>) {
.modules
.into_iter()
.for_each(|m| {
tracing::error!("Module: {:?}", m.value);
assert!(matches!(
m.value,
windmill_api_client::types::FlowModuleValue::RawScript(RawScript {
@@ -102,9 +102,7 @@
}
schema = schema
schemaString = JSON.stringify(schema, null, '\t')
if (jsonEditor) {
jsonEditor.setCode(schemaString)
}
jsonEditor?.setCode(schemaString)
dispatch('change', schema)
}
@@ -0,0 +1,45 @@
<script lang="ts">
import { goto } from '$app/navigation'
import { page } from '$app/stores'
import { sendUserToast } from '$lib/toast'
import { onMount } from 'svelte'
import { OauthService } from '$lib/gen'
import { oauthStore } from '$lib/stores'
import CenteredPage from '$lib/components/CenteredPage.svelte'
import PageHeader from '$lib/components/PageHeader.svelte'
import { Loader2 } from 'lucide-svelte'
let client_name = 'supabase'
let error = $page.url.searchParams.get('error')
let code = $page.url.searchParams.get('code') ?? undefined
let state = $page.url.searchParams.get('state') ?? undefined
onMount(async () => {
if (error) {
sendUserToast(`Error trying to fetch projects from windmill: ${error}`, true)
goto('/resources')
} else if (code && state) {
try {
const res = await OauthService.connectCallback({
clientName: client_name,
requestBody: { code, state }
})
$oauthStore = res
goto(`/resources?callback=${client_name}`)
} catch (e) {
sendUserToast(`Error parsing the response token, ${e.body}`, true)
goto('/resources')
}
} else {
sendUserToast('Missing code or state as query params', true)
goto('/resources')
}
})
</script>
<CenteredPage>
<PageHeader title="Connection to supabase in progress" />
<div class="mx-auto w-0">
<Loader2 class="animate-spin" />
</div>
</CenteredPage>