fix(db): replace crypto.randomUUID with custom UUID generator

This commit is contained in:
2026-08-07 13:11:27 +02:00
parent e47ffbaca9
commit e64e2353d9
3 changed files with 14 additions and 5 deletions
+7
View File
@@ -0,0 +1,7 @@
export function generateUUID(): string {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
const r = (Math.random() * 16) | 0;
const v = c === "x" ? r : (r & 0x3) | 0x8;
return v.toString(16);
});
}