latest changes
This commit is contained in:
1 parent
56cd6fd058
commit
1de72863db
40 files changed
+3837
-568
No files matched your search
@@ -45,12 +45,10 @@ export default async function ArticlePage({
|
||||
const { slug } = await params;
|
||||
const t = await getTranslations("pages.article");
|
||||
|
||||
let article: Awaited<ReturnType<typeof prisma.websiteArticles.findUnique>> = null;
|
||||
try {
|
||||
article = await prisma.websiteArticles.findUnique({ where: { slug } });
|
||||
} catch {
|
||||
article = null;
|
||||
}
|
||||
const article = await prisma.websiteArticles.findUnique({
|
||||
where: { slug },
|
||||
select: { id: true, slug: true, title: true, shortStory: true, fullStory: true, image: true, createdAt: true, updatedAt: true },
|
||||
}).catch(() => null);
|
||||
if (!article) notFound();
|
||||
|
||||
const articleId = article.id;
|
||||
|
||||
Reference in new issue
Block a user