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:
@@ -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)
|
||||
|
||||
@@ -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)),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user