make work with prefixed url

This commit is contained in:
Tuomas Katajisto 2025-08-01 20:38:17 +03:00
parent 9e2fef2433
commit a218e826b2

View File

@ -25,7 +25,7 @@
<div class="book-grid">
{{range .books}}
<div class="book-card">
<img src="{{.ImagePath}}" alt="Cover of {{.Name}}">
<img src="./{{.ImagePath}}" alt="Cover of {{.Name}}">
<div class="book-details">
<h2>{{.Name}}</h2>
<div class="checkbox-group">
@ -59,7 +59,7 @@
console.log(`Updating Book ID: ${bookId}, Person: ${person}, Read: ${isRead}`);
// Send the data to the backend API endpoint
fetch(`/books/${bookId}/update`, {
fetch(`./books/${bookId}/update`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',