colores asignados al azar y simulador de jugadores en el dashboard
This commit is contained in:
@@ -331,6 +331,17 @@ class ColyseusService {
|
||||
return room;
|
||||
}
|
||||
|
||||
async fetchAllowedUuids(): Promise<string[]> {
|
||||
try {
|
||||
const res = await fetch(`${this.apiBase}/admin/uuids`);
|
||||
const data = await res.json();
|
||||
return Array.isArray(data?.uuids) ? data.uuids : [];
|
||||
} catch (e) {
|
||||
console.error('Failed to fetch allowed UUIDs', e);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
private getUuidFromPath(): string {
|
||||
if (typeof window === 'undefined') return '';
|
||||
const path = window.location.pathname.replace(/^\/+/, '');
|
||||
|
||||
Reference in New Issue
Block a user