add: data from MongoDB

Retrieve Data from MongoDB
This commit is contained in:
Fiona Lena Urban 2025-04-07 20:53:15 +02:00
parent 628659c39d
commit ae0f6cb620
9 changed files with 210 additions and 9 deletions

View file

@ -0,0 +1,9 @@
export default defineEventHandler(async () => {
try {
return await ProductSchema.find()
} catch (error) {
console.error(error)
return []
}
})