Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
39c9d0218f
|
|
@ -72,7 +72,7 @@ async function getScore(cid: string) {
|
|||
noUpdate: true,
|
||||
noExpire: true,
|
||||
getValueFun: async () => {
|
||||
let resut
|
||||
let result
|
||||
await lock.acquire(cid, async () => {
|
||||
const meta = await prisma.metadata.findFirst({
|
||||
where: {
|
||||
|
|
@ -81,7 +81,7 @@ async function getScore(cid: string) {
|
|||
})
|
||||
if (meta) {
|
||||
if (meta?.ai_score !== null) {
|
||||
resut = {
|
||||
result = {
|
||||
number: meta.ai_score,
|
||||
reason: meta.ai_score_reason,
|
||||
}
|
||||
|
|
@ -98,7 +98,7 @@ async function getScore(cid: string) {
|
|||
},
|
||||
})
|
||||
|
||||
resut = score
|
||||
result = score
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
@ -112,11 +112,11 @@ async function getScore(cid: string) {
|
|||
},
|
||||
})
|
||||
|
||||
resut = score
|
||||
result = score
|
||||
}
|
||||
}
|
||||
})
|
||||
return resut
|
||||
return result
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -109,6 +109,10 @@ export default async function SiteNFTPage({
|
|||
nft.content_uri?.startsWith?.("http") ||
|
||||
nft.content_uri?.startsWith?.("data:")
|
||||
? nft.content_uri
|
||||
: nft.content_uri?.startsWith?.("<svg")
|
||||
? `data:image/svg+xml,${encodeURIComponent(
|
||||
nft.content_uri,
|
||||
)}` || ""
|
||||
: toGateway(`ipfs://${nft.content_uri}`) || ""
|
||||
}
|
||||
mime_type={nft.content_type}
|
||||
|
|
|
|||
Loading…
Reference in New Issue