diff --git a/client/src/views/HomeView.vue b/client/src/views/HomeView.vue index 1963d11..c0f2c3d 100644 --- a/client/src/views/HomeView.vue +++ b/client/src/views/HomeView.vue @@ -227,7 +227,7 @@
+ @click="$router.push(`/document/${doc.id}`)">
{{ doc.title }}
@@ -253,7 +253,7 @@
+ @click="$router.push(`/document/${doc.id}`)">
{{ doc.title }}
diff --git a/server/check-documents.js b/server/check-documents.js new file mode 100644 index 0000000..7693551 --- /dev/null +++ b/server/check-documents.js @@ -0,0 +1,17 @@ +import { getDb } from './db/db.js'; + +const db = getDb(); + +const docs = db.prepare(` + SELECT id, title, created_at + FROM documents + ORDER BY created_at DESC +`).all(); + +console.log(`\nTotal documents in database: ${docs.length}\n`); + +docs.forEach((doc, i) => { + console.log(`${i + 1}. ${doc.title}`); + console.log(` ID: ${doc.id}`); + console.log(` Created: ${new Date(doc.created_at).toISOString()}\n`); +});