Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
DIYgod
2023-08-05 16:10:33 +01:00
2 changed files with 9 additions and 5 deletions
+5 -5
View File
@@ -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
},
})
+4
View File
@@ -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}