Skip to content

Commit

Permalink
Merge pull request #661 from appwrite/fix-error-usage
Browse files Browse the repository at this point in the history
Fix: error page on usage
  • Loading branch information
eldadfux authored Dec 19, 2023
2 parents 499d545 + 19209dd commit 31fd420
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,18 @@ export const load: PageLoad = async ({ params, parent }) => {
sdk.forConsole.billing.listUsage(params.organization, startDate, endDate)
]);

const projectNames = await sdk.forConsole.projects.list([
Query.equal(
'$id',
usage.projects.map((p) => p.projectId)
)
]);
const queries: string[] = [];

if (usage.projects.length > 0) {
queries.push(
Query.equal(
'$id',
usage.projects.map((p) => p.projectId)
)
);
}

const projectNames = await sdk.forConsole.projects.list(queries);

return {
organizationUsage: usage,
Expand Down

1 comment on commit 31fd420

@vercel
Copy link

@vercel vercel bot commented on 31fd420 Dec 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

console-cloud – ./

console-cloud.vercel.app
console-cloud-git-main-appwrite.vercel.app
console-cloud-appwrite.vercel.app

Please sign in to comment.