added tons of features

This commit is contained in:
2025-02-05 08:01:14 +02:00
parent 4ae0d8c545
commit 8138da6b1d
195 changed files with 12619 additions and 415 deletions

17
actions/model/category.ts Normal file
View File

@@ -0,0 +1,17 @@
'use server'
import {CategoryLocale, Lang} from '@prisma/client'
import {db} from '@/lib/db/prisma/client'
export const getCategoryBySlug = async (data: {
slug: string
lang: string
}): Promise<CategoryLocale | null> => {
return db.categoryLocale.findFirst({
where: {
slug: data.slug,
lang: data.lang as Lang
}
})
}