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>
17 lines
416 B
JavaScript
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`);
|
|
});
|