mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Fix sites to be public
This commit is contained in:
@@ -2,15 +2,8 @@ import { Query } from '@appwrite.io/console';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { getLimit, getPage, getSearch, getView, pageToOffset, View } from '$lib/helpers/load';
|
||||
import { CARD_LIMIT, Dependencies } from '$lib/constants';
|
||||
import { APPWRITE_OFFICIALS_ORG, isCloud } from '$lib/system';
|
||||
|
||||
export const load = async ({ url, depends, route, params, parent }) => {
|
||||
// don't load anything on cloud unless org is appwrite atm!
|
||||
const { organization } = await parent();
|
||||
if (isCloud && organization?.$id !== APPWRITE_OFFICIALS_ORG) {
|
||||
return;
|
||||
}
|
||||
|
||||
export const load = async ({ url, depends, route, params }) => {
|
||||
depends(Dependencies.SITES);
|
||||
|
||||
const page = getPage(url);
|
||||
|
||||
@@ -2,17 +2,9 @@ import Breadcrumbs from './breadcrumbs.svelte';
|
||||
import Header from './header.svelte';
|
||||
import { Dependencies } from '$lib/constants';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { error, redirect } from '@sveltejs/kit';
|
||||
import { APPWRITE_OFFICIALS_ORG, isCloud } from '$lib/system';
|
||||
import { base } from '$app/paths';
|
||||
|
||||
export const load = async ({ depends, params, parent }) => {
|
||||
// don't load anything on cloud unless org is appwrite atm!
|
||||
const { organization } = await parent();
|
||||
if (isCloud && organization?.$id !== APPWRITE_OFFICIALS_ORG) {
|
||||
redirect(307, `${base}/project-${params.region}-${params.project}/sites`);
|
||||
}
|
||||
import { error } from '@sveltejs/kit';
|
||||
|
||||
export const load = async ({ depends, params }) => {
|
||||
depends(Dependencies.SITE);
|
||||
try {
|
||||
const [site] = await Promise.all([
|
||||
|
||||
Reference in New Issue
Block a user