mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Fix error page on usage
This commit is contained in:
1 parent
499d5455f5
commit
41e8f11245
1 file changed
+8
-4
@@ -41,12 +41,16 @@ export const load: PageLoad = async ({ params, parent }) => {
|
||||
sdk.forConsole.billing.listUsage(params.organization, startDate, endDate)
|
||||
]);
|
||||
|
||||
const projectNames = await sdk.forConsole.projects.list([
|
||||
Query.equal(
|
||||
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,
|
||||
|
||||
Reference in new issue
Block a user