Skip to content

Commit 53f427a

Browse files
committed
feat: exclude relay accounts from home page
1 parent 6cde19f commit 53f427a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pages/home/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
import { eq, not } from "drizzle-orm";
12
import { escape } from "es-toolkit";
23
import { Hono } from "hono";
34
import { Layout } from "../../components/Layout.tsx";
45
import db from "../../db.ts";
6+
import { HOLLO_RELAY_ACTOR_ID } from "../../entities/relay.ts";
7+
import { accountOwners } from "../../schema.ts";
58
import { renderCustomEmojis } from "../../text.ts";
69

710
const homePage = new Hono().basePath("/");
@@ -10,6 +13,7 @@ homePage.get("/", async (c) => {
1013
const credential = await db.query.credentials.findFirst();
1114
if (credential == null) return c.redirect("/setup");
1215
const owners = await db.query.accountOwners.findMany({
16+
where: not(eq(accountOwners.id, HOLLO_RELAY_ACTOR_ID)),
1317
with: { account: true },
1418
});
1519
if (owners.length < 1) return c.redirect("/accounts");

0 commit comments

Comments
 (0)