Skip to content

Commit

Permalink
fix(nsu-proxy): do not update/list status of accounts which are consi…
Browse files Browse the repository at this point in the history
…dered dead
  • Loading branch information
johnpyp committed Oct 25, 2024
1 parent 0fac19f commit c2852e4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nsu-proxy/src/bot/bot-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,11 @@ class BMDatabase {
status,
notStatus,
}: { status?: AccountStatus; notStatus?: AccountStatus } = {}): Promise<AccountTable[]> {
let query = this.db.selectFrom("accounts").selectAll().orderBy("statusUpdatedAtMillis", "desc");
let query = this.db
.selectFrom("accounts")
.selectAll()
.orderBy("statusUpdatedAtMillis", "desc")
.where("status", "!=", "DEAD");

if (status) {
query = query.where("status", "=", status);
Expand Down Expand Up @@ -585,6 +589,7 @@ class BMDatabase {
statusUpdatedAtMillis: Date.now(),
})
.where("username", "=", username)
.where("status", "!=", "DEAD")
.execute();
}

Expand Down

0 comments on commit c2852e4

Please sign in to comment.