feat: новая функция

This commit is contained in:
2025-10-09 16:48:20 +03:00
parent dd2c9988a5
commit 13fb51e447
60 changed files with 7694 additions and 1157 deletions

View File

@@ -15,7 +15,11 @@
* @returns {string} - Уникальный ID
*/
export const generateUniqueId = () => {
return `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
// Генерируем в формате guest_* для совместимости с UniversalGuestService
const array = new Uint8Array(16);
crypto.getRandomValues(array);
const hex = Array.from(array, byte => byte.toString(16).padStart(2, '0')).join('');
return `guest_${hex}`;
};
/**