mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Merge branch 'fix-sdk-context' into 'sdk-context-main-merge'.
This commit is contained in:
@@ -94,6 +94,14 @@ export const realtime = {
|
||||
const endpoint = getApiEndpoint(region);
|
||||
if (endpoint !== clientRealtime.config.endpoint) {
|
||||
clientRealtime.setEndpoint(endpoint);
|
||||
|
||||
/**
|
||||
* Workaround: the SDK doesn't update the realtime in `setEndpoint`.
|
||||
* Until that's fixed, we manually set the realtime endpoint like this:
|
||||
*/
|
||||
clientRealtime.setEndpointRealtime(
|
||||
endpoint.replace('https://', 'wss://').replace('http://', 'ws://')
|
||||
);
|
||||
}
|
||||
return clientRealtime;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
let error: string;
|
||||
|
||||
onMount(async () => {
|
||||
/* use console sdk here as project is not always available here. */
|
||||
/* use console sdk as project is not always available here. */
|
||||
const locale = await sdk.forConsole.locale.get();
|
||||
const countryList = await sdk.forConsole.locale.listCountries();
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
let error: string;
|
||||
|
||||
onMount(async () => {
|
||||
/* use console sdk here as project is not always available here. */
|
||||
/* use console sdk as project is not always available here. */
|
||||
const locale = await sdk.forConsole.locale.get();
|
||||
const countryList = await sdk.forConsole.locale.listCountries();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user