add services/message-delivery-method-web-push/test-send-notification.js
Main daploy / deploy (push) Successful in 48s
Main daploy / deploy (push) Successful in 48s
This commit is contained in:
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user