grand commit

This commit is contained in:
2025-02-07 08:34:42 +02:00
parent f594f001f6
commit c6c34f0453
53 changed files with 1283 additions and 625 deletions

View File

@@ -0,0 +1,22 @@
'use server'
import {CategoryLocale} from '@prisma/client'
import {STORE_ID} from '@/lib/config/constants'
import {db} from '@/lib/db/prisma/client'
export const getCategoryBySlug = async (slug: string) => {
return db.categoryLocale.findFirst({
where: {
slug
},
select: {
category: {
include: {
locales: true,
categoriesOnProducts: true
}
}
}
})
}