mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
update: compute things later.
This commit is contained in:
@@ -8,13 +8,15 @@ import { redirect } from '@sveltejs/kit';
|
||||
export const load: PageLoad = async ({ params, url, route, depends, parent }) => {
|
||||
const { scopes } = await parent();
|
||||
depends(Dependencies.ORGANIZATION);
|
||||
const page = getPage(url);
|
||||
const limit = getLimit(url, route, CARD_LIMIT);
|
||||
const offset = pageToOffset(page, limit);
|
||||
|
||||
if (!scopes.includes('projects.read') && scopes.includes('billing.read')) {
|
||||
return redirect(301, `/console/organization-${params.organization}/billing`);
|
||||
}
|
||||
|
||||
const page = getPage(url);
|
||||
const limit = getLimit(url, route, CARD_LIMIT);
|
||||
const offset = pageToOffset(page, limit);
|
||||
|
||||
const projects = await sdk.forConsole.projects.list([
|
||||
Query.offset(offset),
|
||||
Query.equal('teamId', params.organization),
|
||||
|
||||
Reference in New Issue
Block a user