Spaces:
Paused
Paused
fix condition get
Browse files
src/routes/api/models/+server.ts
CHANGED
|
@@ -35,7 +35,7 @@ export async function GET(request : RequestEvent) {
|
|
| 35 |
const cards = await prisma.model.findMany({
|
| 36 |
where: {
|
| 37 |
...(
|
| 38 |
-
|
| 39 |
),
|
| 40 |
OR: [
|
| 41 |
{ id: { contains: search } },
|
|
|
|
| 35 |
const cards = await prisma.model.findMany({
|
| 36 |
where: {
|
| 37 |
...(
|
| 38 |
+
!IS_ADMIN ? { isPublic: true } : only_not_public ? { isPublic: false } : {}
|
| 39 |
),
|
| 40 |
OR: [
|
| 41 |
{ id: { contains: search } },
|