Fix lint: rename shadowed variables in user model

- findUserByUsername: use imported sql directly instead of destructuring
  it from the callback (shadowed the top-level import)
- findUsersPaginated: rename orderBy callback param from users to t
  (shadowed the outer users result variable)

https://claude.ai/code/session_01E4UUQqQedhFP2F5YcBRArs
This commit is contained in:
Claude 2026-05-15 19:01:16 +00:00
parent a45a8619b1
commit 95f65e6b83
No known key found for this signature in database

View file

@ -43,7 +43,7 @@ export async function findUsersByIds(ids: string[]): Promise<User[]> {
export async function findUserByUsername(username: string): Promise<User | undefined> {
const db = database();
return await db.query.users.findFirst({
where: (users, { sql }) => sql`lower(${users.username}) = lower(${username})`,
where: (u) => sql`lower(${u.username}) = lower(${username})`,
});
}
@ -128,7 +128,7 @@ export async function findUsersPaginated(options: {
const [users, [{ count }]] = await Promise.all([
db.query.users.findMany({
where: filter,
orderBy: (users, { asc }) => [asc(users.displayName)],
orderBy: (t, { asc }) => [asc(t.displayName)],
limit: options.limit,
offset: options.offset,
}),