diff --git a/src/app/api/score/route.ts b/src/app/api/score/route.ts index 6f62effe..83df85a9 100644 --- a/src/app/api/score/route.ts +++ b/src/app/api/score/route.ts @@ -10,7 +10,16 @@ const lock = new AsyncLock() const getOriginalScore = async (cid: string) => { try { - let { content } = await (await fetch(toGateway(`ipfs://${cid}`))).json() + let { content, tags } = await ( + await fetch(toGateway(`ipfs://${cid}`)) + ).json() + + if (tags?.[0] === "portfolio") { + return { + number: 100, + reason: "Portfolio", + } + } if (content?.length > 5000) { content = content.slice(0, 5000) diff --git a/src/models/home.model.ts b/src/models/home.model.ts index e06c19b9..cf5dc979 100644 --- a/src/models/home.model.ts +++ b/src/models/home.model.ts @@ -781,7 +781,11 @@ export async function getFeed({ .filter( (post) => countCharacters(post?.metadata?.content?.content || "") > - (post?.metadata?.content?.tags?.[0] === "comment" ? 6 : 300) && + (post?.metadata?.content?.tags?.[0] === "comment" + ? 6 + : post?.metadata?.content?.tags?.[0] === "portfolio" + ? -1 + : 300) && !(new Date(post.metadata?.content?.date_published || "") > new Date()), ) .map((post) => {