navidocs/server/check-documents.js
ggq-admin 4eeb927316 Fix router path - change /documents/ to /document/ in HomeView
Fixed incorrect router navigation causing "No match found" error when
clicking on documents from the home page.

Issue:
- HomeView was navigating to /documents/{id} (plural)
- Router configured as /document/:id (singular)
- Result: Vue Router warning and blank page

Fix:
- Updated both document click handlers in HomeView.vue
- Changed @click routes from /documents/ to /document/
- Lines 230 and 256

Testing:
Clicking documents from home page now correctly navigates to DocumentView
at http://172.29.75.55:8083

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 01:43:15 +02:00

17 lines
416 B
JavaScript

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`);
});