Skip to content

Commit

Permalink
Fix typing of Database.getTable returns
Browse files Browse the repository at this point in the history
  • Loading branch information
mia-pi-git committed Apr 6, 2024
1 parent 6be86db commit 64a6a70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export abstract class Database<Pool extends mysql.Pool | pg.Pool = mysql.Pool |
return this._queryExec(query, values);
}
getTable<Row>(name: string, primaryKeyName: keyof Row & string | null = null) {
return new DatabaseTable<Row, this>(this, name, primaryKeyName);
return new DatabaseTable<Row, typeof this>(this, name, primaryKeyName);
}
close() {
void this.connection.end();
Expand Down
2 changes: 1 addition & 1 deletion src/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ export class Session {
count: attempts.count, time: time(),
});
} else {
await loginattempts.insert({userid, ip, time: time()});
await loginattempts.insert({userid, time: time()});
}
return false;
}
Expand Down

0 comments on commit 64a6a70

Please sign in to comment.