Compare commits

..

1 Commits

View File

@@ -17,16 +17,7 @@ router.get('/', async (req, res) => {
</ul>
<h2>models</h2>
<ul>${
(await Promise.all(
(
await mongoose.modelNames()).map(async (name) => {
const count = await mongoose.model(name).countDocuments()
return `<li>${name} - ${count}</li>`
}
)
)).map(t => t).join(' ')
}</ul>
<ul>${(await mongoose.modelNames()).map((name) => `<li>${name}</li>`)}</ul>
`)
})