enzostvs HF staff commited on
Commit
f3dac82
β€’
1 Parent(s): d9ecfe6

fix condition get

Browse files
Files changed (1) hide show
  1. src/routes/api/models/+server.ts +1 -1
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
- (IS_ADMIN && only_not_public) ? { isPublic: false } : !only_not_public ? {} : { isPublic: true }
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 } },