fix total account count function

This commit is contained in:
reya 2023-11-23 08:52:04 +07:00
parent 536ea30ed2
commit 628102087e
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ export class LumeStorage {
public async checkAccount() {
const result: Array<{ total: string }> = await this.db.select(
'SELECT COUNT(*) AS "total" FROM accounts;'
'SELECT COUNT(*) AS "total" FROM accounts WHERE is_active = "1" ORDER BY id DESC LIMIT 1;'
);
return parseInt(result[0].total);
}