From 4eeb927316919fc9805e809ce2cb26482b3fd574 Mon Sep 17 00:00:00 2001 From: ggq-admin Date: Mon, 20 Oct 2025 01:43:15 +0200 Subject: [PATCH] Fix router path - change /documents/ to /document/ in HomeView MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- client/src/views/HomeView.vue | 4 ++-- server/check-documents.js | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 server/check-documents.js 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`); +});