next MongoDB api route returns []

Does anyone know why im not geting my data to show up I've checked everything like 3 times and can't understand why im geting an empty array even when i change it to.find({}) get same result
No description
No description
4 Replies
joey
joeyOP9mo ago
No description
joey
joeyOP9mo ago
No description
Neto
Neto9mo ago
find returns all values that match the query the [] just means that no tool was found
joey
joeyOP9mo ago
i get the same result even when I do find({}) it should return all data in the data table but I just get the same result got it to work with this export async function GET() { await connect(); const tools = await ToolData.find({}); return NextResponse.json(tools); }
Want results from more Discord servers?
Add your server