Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/routes/console/(migration-wizard)/resource-form.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
resourcesToMigrationForm
} from '$lib/stores/migration';
import { addNotification } from '$lib/stores/notifications';
import { wizard } from '$lib/stores/wizard';

export let formData: ReturnType<typeof createMigrationFormStore>;
export let provider: ReturnType<typeof createMigrationProviderStore>;
Expand Down Expand Up @@ -100,6 +101,12 @@
case 'firebase': {
if ($provider.projectId) {
// OAuth
const res = await sdk.forProject.migrations.getFirebaseReportOAuth(
providerResources.firebase,
$provider.projectId
);

report = res;
} else if ($provider.serviceAccount) {
// Manual auth
const res = await sdk.forProject.migrations.getFirebaseReport(
Expand Down Expand Up @@ -139,7 +146,7 @@

$: resources = providerResources[$provider.provider];

// $: wizard.setNextDisabled(!report);
$: wizard.setNextDisabled(!report);
</script>

<div class="box" style:border-radius="0.5rem">
Expand Down
2 changes: 1 addition & 1 deletion src/routes/console/(migration-wizard)/wizard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
const resources = migrationFormToResources($formData);
if ($provider.provider !== 'appwrite') return;

await getSdkForProject($selectedProject).migrations.migrateAppwrite(
await getSdkForProject($selectedProject).migrations.createAppwriteMigration(
resources,
$provider.endpoint,
$provider.projectID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,7 @@
}))} />
</FormList>
<p class="u-text-center u-margin-block-start-24">
Signed in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about this text ?

<button class="u-bold" on:click|preventDefault={deauthorizeGoogle}>
Sign Out?
</button>
<button class="u-bold" on:click|preventDefault={deauthorizeGoogle}>Sign Out</button>
</p>
{/if}
{:else if $provider.provider === 'supabase'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
case 'firebase': {
if ($provider.projectId) {
// OAuth
const res = await sdk.forProject.migrations.createFirebaseOAuthMigration(
resources,
$provider.projectId
);

} else if ($provider.serviceAccount) {
// Manual auth
await sdk.forProject.migrations.createFirebaseMigration(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ async function getFirebaseProjects() {
const res = await sdk.forProject.migrations.listFirebaseProjects();
return res.projects;
} catch (e) {
if (e.code === 401) {
if (e.type === 'user_identity_not_found') {
return [];
} else {
throw e;
Expand Down