#help creating a prisma query for an api route

3 messages · Page 1 of 1 (latest)

raven phoenix
#

ok so

// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "sqlite"
  url      = "file:./dev.db"
}

model accounts {
  id Int @id @default(autoincrement()) @unique
  email String @unique
  password String
  activated Boolean @default(false)
  lifespan Int
  activation_code String @unique
}

model builds {
  id Int @id @default(autoincrement()) @unique
  email String @unique
  handler String
  name String
  date_created Int
  data String
}

this is my schema
is there a way i can write a query so that it only selects builds if the email is activated in my accounts table?

quaint fractalBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

verbal cedar
#

you need to create relations