fix: 404 error fetching countries

This commit is contained in:
Steven Nguyen
2025-06-02 12:12:33 -07:00
parent 953725a9c9
commit 7569ec6aca
3 changed files with 4 additions and 12 deletions
@@ -1,6 +1,5 @@
<script lang="ts">
import { invalidate } from '$app/navigation';
import { page } from '$app/state';
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
import { Modal } from '$lib/components';
import { Dependencies } from '$lib/constants';
@@ -28,10 +27,8 @@
let error: string = null;
onMount(async () => {
const countryList = await sdk
.forProject(page.params.region, page.params.project)
.locale.listCountries();
const locale = await sdk.forProject(page.params.region, page.params.project).locale.get();
const countryList = await sdk.forConsole.locale.listCountries();
const locale = await sdk.forConsole.locale.get();
if (locale.countryCode) {
country = locale.countryCode;
}
@@ -28,7 +28,6 @@
Tag,
Typography
} from '@appwrite.io/pink-svelte';
import { page } from '$app/state';
let show = false;
let showEdit = false;
@@ -38,9 +37,7 @@
let countryList: Models.CountryList;
onMount(async () => {
countryList = await sdk
.forProject(page.params.region, page.params.project)
.locale.listCountries();
countryList = await sdk.forConsole.locale.listCountries();
});
$: orgList = $organizationList.teams as unknown as Organization[];
@@ -22,9 +22,7 @@
];
onMount(async () => {
const countryList = await sdk
.forProject(page.params.region, page.params.project)
.locale.listCountries();
const countryList = await sdk.forConsole.locale.listCountries();
options = countryList.countries.map((country) => {
return {
value: country.code,