This seems to function, doesn't include bots

This commit is contained in:
Kinetix 2025-01-26 13:23:14 -08:00
parent 326bc0a24f
commit be075d9c5f

View file

@ -67,13 +67,10 @@ export class NodeinfoServerService {
] = await Promise.all([
this.metaService.fetch(true),
// 重い
this.usersRepository.count({ where: { host: IsNull(), lastActiveDate: MoreThan(new Date(now - 15552000000)) } }),
this.usersRepository.count({ where: { host: IsNull(), lastActiveDate: MoreThan(new Date(now - 2592000000)) } }),
this.usersRepository.count({ where: { host: IsNull(), isBot: false, lastActiveDate: MoreThan(new Date(now - 15552000000)) } }),
this.usersRepository.count({ where: { host: IsNull(), isBot: false, lastActiveDate: MoreThan(new Date(now - 2592000000)) } }),
]);
// const activeHalfyear = null;
// const activeMonth = null;
const proxyAccount = meta.proxyAccountId ? await this.userEntityService.pack(meta.proxyAccountId).catch(() => null) : null;
const basePolicies = { ...DEFAULT_POLICIES, ...meta.policies };