fix: uploadMetadata

This commit is contained in:
Ou 2024-10-19 15:42:09 +08:00
parent 49d1b5cbea
commit e9909d0a24

View File

@ -9,7 +9,7 @@ import { safeParseString } from "~/utils"
export async function uploadMetadata(metadata: PrimitiveMetadata) {
if (!__ENABLE_LOGIN__) return
const jwt = localStorage.getItem("jwt")
const jwt = safeParseString(localStorage.getItem("jwt"))
if (!jwt) return
try {
await ofetch("/api/me/sync", {