Use the same widget for books everywhere

This commit is contained in:
2026-03-27 22:08:24 +01:00
parent 726c640657
commit e05c9f2b45
17 changed files with 70 additions and 146 deletions

View File

@@ -19,7 +19,7 @@ func TestFetchAllBooks(t *testing.T) {
assert.Equal(t, 15, len(result.Books))
}
func testFetchBooks(t *testing.T, limit string, offset string) dto.BookSearchGet {
func testFetchBooks(t *testing.T, limit string, offset string) dto.BookItemsGet {
router := testutils.TestSetup()
u, err := url.Parse("/ws/books")
@@ -47,7 +47,7 @@ func testFetchBooks(t *testing.T, limit string, offset string) dto.BookSearchGet
w := httptest.NewRecorder()
router.ServeHTTP(w, req)
var result dto.BookSearchGet
var result dto.BookItemsGet
s := w.Body.String()
err = json.Unmarshal([]byte(s), &result)
if err != nil {