fix(library): update author fields 4f5ed068
Steve · 2026-10-26 20:38 2 file(s) · +3 −3
apps/library/handlers_web.go +1 −1
198 198
		web.RedirectWithError(w, r, "/admin", "Invalid status")
199 199
		return
200 200
	}
201 -
	b := NewBook{Title: r.FormValue("title"), Authors: r.FormValue("authors"), Status: status}
201 +
	b := NewBook{Title: r.FormValue("title"), Authors: r.FormValue("author_name"), Status: status}
202 202
	if v := strings.TrimSpace(r.FormValue("key")); v != "" {
203 203
		b.OLKey = &v
204 204
	}
apps/library/templates/admin.html +2 −2
230 230
          '<p class="book-authors"></p>' +
231 231
          (hit.isbn ? '<p class="book-meta">ISBN: ' + escapeHtml(hit.isbn) + '</p>' : '');
232 232
        info.querySelector('.book-title').textContent = hit.title;
233 -
        info.querySelector('.book-authors').textContent = hit.authors;
233 +
        info.querySelector('.book-authors').textContent = hit.author_name;
234 234
235 235
        const hidden = function(name, value) {
236 236
          const el = document.createElement('input');
241 241
        };
242 242
        info.appendChild(hidden('key', hit.key));
243 243
        info.appendChild(hidden('title', hit.title));
244 -
        info.appendChild(hidden('authors', hit.authors));
244 +
        info.appendChild(hidden('author_name', hit.author_name));
245 245
        info.appendChild(hidden('isbn', hit.isbn));
246 246
        info.appendChild(hidden('cover_url', hit.cover_url));
247 247