mirror of
https://github.com/luminous-devs/lume.git
synced 2024-10-04 02:40:47 +00:00
fix total account count function
This commit is contained in:
parent
536ea30ed2
commit
628102087e
@ -163,7 +163,7 @@ export class LumeStorage {
|
|||||||
|
|
||||||
public async checkAccount() {
|
public async checkAccount() {
|
||||||
const result: Array<{ total: string }> = await this.db.select(
|
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);
|
return parseInt(result[0].total);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user