mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: 404 error fetching countries
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user