fix
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 37s
Docker Build & Deploy / Deploy to Production (push) Successful in 8s

This commit is contained in:
2026-01-02 18:51:28 +08:00
parent e250a7df2f
commit 5c76e9287e
9 changed files with 60 additions and 66 deletions

View File

@@ -107,8 +107,13 @@ const handleNotificationToggle = async (checked) => {
return
}
const { data: { publicKey } } = await getVapidPublicKey()
const convertedVapidKey = urlBase64ToUint8Array(publicKey)
let { success, data, message } = await getVapidPublicKey()
if (!success) {
throw new Error(message || '获取 VAPID 公钥失败')
}
const convertedVapidKey = urlBase64ToUint8Array(data)
const subscription = await registration.pushManager.subscribe({
userVisibleOnly: true,