add services/message-delivery-method-web-push/test-send-notification.js
Main daploy / deploy (push) Successful in 48s

This commit is contained in:
2024-11-24 11:51:45 +02:00
parent 89ec27ed23
commit 46c26e28e3
17 changed files with 272 additions and 90 deletions
+10
View File
@@ -0,0 +1,10 @@
import { LOCALSTORAGE_KEY_BROWSER_UUID } from '@/constants/localStorageKeys'
export function getBrowserUuid(): string {
let browserUuid = localStorage.getItem(LOCALSTORAGE_KEY_BROWSER_UUID)
if (!browserUuid) {
browserUuid = crypto.randomUUID() // Браузерная API для генерации UUID
localStorage.setItem(LOCALSTORAGE_KEY_BROWSER_UUID, browserUuid)
}
return browserUuid
}
+10
View File
@@ -0,0 +1,10 @@
import { LOCALSTORAGE_KEY_USER_UUID } from '@/constants/localStorageKeys'
export function getUserUuid(): string {
let userUuid = localStorage.getItem(LOCALSTORAGE_KEY_USER_UUID)
if (!userUuid) {
userUuid = crypto.randomUUID()
localStorage.setItem(LOCALSTORAGE_KEY_USER_UUID, userUuid)
}
return userUuid
}