feat: Adding the name of capturers of planets + displaying usernames for each team
This commit is contained in:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user