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
mag
mag2mo ago
No description
mag
mag2mo ago
No description
Neto
Neto2mo ago
find returns all values that match the query the [] just means that no tool was found
mag
mag2mo 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
More Posts