Private
Public Access
1
0

feat: Adding the name of capturers of planets + displaying usernames for each team

This commit is contained in:
gauvainboiche
2026-04-01 17:46:48 +02:00
parent 362aa07f5a
commit e28a2d6e9c
8 changed files with 217 additions and 10 deletions

View File

@@ -75,6 +75,16 @@ export async function getTeamPlayerCounts() {
return result;
}
/** Returns username and team for each of the given user IDs. */
export async function getUsersByIds(ids) {
if (!ids.length) return [];
const { rows } = await usersPool.query(
`SELECT id, username, team FROM users WHERE id = ANY($1::int[])`,
[ids]
);
return rows;
}
// ── User action quota ─────────────────────────────────────────────────────────
/** Returns the current quota row for a user, or null if it doesn't exist. */