remove: id from UsageProjectInfo.

This commit is contained in:
Darshan
2025-06-08 12:34:16 +05:30
parent 405a5a80d2
commit f3902889ed
2 changed files with 2 additions and 3 deletions
@@ -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
};