Show pinned orgs on the front page

Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
Alexis Sellier
2021-09-30 15:01:32 +02:00
parent 8493dfe52c
commit e2cc61671b
8 changed files with 89 additions and 23 deletions
+7
View File
@@ -172,6 +172,13 @@ export class Org {
}
}
static async getMulti(ids: string[], config: Config): Promise<Array<Org>> {
const results = await Promise.all(ids.map(addr => Org.get(addr, config)));
const orgs = results.filter((org): org is Org => org != null);
return orgs;
}
static async getAll(config: Config): Promise<Array<Org>> {
const result = await utils.querySubgraph(config.orgs.subgraph, GetOrgs, {});
const orgs: Org[] = [];