mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
remove: id from UsageProjectInfo.
This commit is contained in:
@@ -4,7 +4,7 @@ import { sdk } from '$lib/stores/sdk';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { regions } from '$lib/stores/organization';
|
||||
|
||||
export type UsageProjectInfo = Pick<Models.Project, '$id' | 'name' | 'region'>;
|
||||
export type UsageProjectInfo = Pick<Models.Project, 'name' | 'region'>;
|
||||
|
||||
export const regionFlagUrls = derived(regions, ($regions) => {
|
||||
if (!$regions?.regions?.length) return [];
|
||||
|
||||
@@ -71,7 +71,7 @@ export const load: PageLoad = async ({ params, parent }) => {
|
||||
// all this to get the project's name and region!
|
||||
function getUsageProjects(usage: OrganizationUsage) {
|
||||
return (async () => {
|
||||
const projects: { [key: string]: UsageProjectInfo } = {};
|
||||
const projects: Record<string, UsageProjectInfo> = {};
|
||||
|
||||
if (usage?.projects?.length > 0) {
|
||||
const chunk = 100;
|
||||
@@ -93,7 +93,6 @@ function getUsageProjects(usage: OrganizationUsage) {
|
||||
for (const response of responses) {
|
||||
for (const project of response.projects) {
|
||||
projects[project.$id] = {
|
||||
$id: project.$id,
|
||||
name: project.name,
|
||||
region: project.region
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user