Move admins into the node details card and exclude cached remote profiles from swarm user totals.

Hop-State: A_06FPDF36J60G1A7815FZXV8
Hop-Proposal: R_06FPDF2DBS4W91EHS4C1HHR
Hop-Task: T_06FPDE1JPYKVAHGNQWNSMER
Hop-Attempt: AT_06FPDE1JPWKP9WRN6NFR3A0
This commit is contained in:
2026-07-15 10:04:10 -07:00
committed by Hop
parent 6d469fd52e
commit c44e33e582
3 changed files with 34 additions and 30 deletions
+3 -1
View File
@@ -49,7 +49,9 @@ export async function buildAnnouncement(): Promise<SwarmAnnouncement> {
}
// Get counts
const userResult = await db.select({ count: sql<number>`count(*)` }).from(users);
const userResult = await db.select({ count: sql<number>`count(*)` })
.from(users)
.where(sql`${users.handle} NOT LIKE '%@%'`);
const postResult = await db.select({ count: sql<number>`count(*)` }).from(posts);
const mediaResult = await db.select({ count: sql<number>`count(*)` })
.from(media)
+2 -1
View File
@@ -361,7 +361,8 @@ export async function getSwarmStats() {
const publicNodes = allNodes.filter(n => isPublicSwarmDomain(n.domain));
const [localUsers, localPosts, localMedia] = await Promise.all([
db.select({ count: sql<number>`count(*)` }).from(users),
db.select({ count: sql<number>`count(*)` }).from(users)
.where(sql`${users.handle} NOT LIKE '%@%'`),
db.select({ count: sql<number>`count(*)` }).from(posts),
db.select({ count: sql<number>`count(*)` }).from(media).where(isNotNull(media.postId)),
]);