Fix sites to be public

This commit is contained in:
Matej Bačo
2025-06-02 18:32:36 +02:00
parent 953725a9c9
commit 92308b6c63
2 changed files with 3 additions and 18 deletions
@@ -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([