fix android shit + fix clients not showing if 2 clients have the same username and pc name as another client

This commit is contained in:
KingKDot
2026-03-21 00:10:47 -05:00
parent 5040074e97
commit 26f5d4ecc6
4 changed files with 108 additions and 2 deletions
+5
View File
@@ -662,6 +662,11 @@ export function clientExists(id: string): boolean {
return !!row?.id;
}
export function getClientPublicKeyById(id: string): string | null {
const row = db.query<{ public_key: string | null }>(`SELECT public_key FROM clients WHERE id=? LIMIT 1`).get(id);
return row?.public_key ?? null;
}
export function listDistinctCountries(): { code: string; count: number }[] {
const rows = db
.query<{ code: string; count: number }>(