Merge branch 'main' into feature/mobile-search-discovery

This commit is contained in:
2026-05-29 04:50:59 +00:00
38 changed files with 2081 additions and 5 deletions
+20
View File
@@ -42,6 +42,26 @@ export const booksApi = {
return data;
},
async searchBooks(params: BookSearchParams = {}): Promise<{ count: number; results: BookListItem[] }> {
const { data } = await api.get<{ count: number; results: BookListItem[] }>("/books/", { params });
return data;
},
async getBook(id: number): Promise<BookDetail> {
const { data } = await api.get<BookDetail>(`/books/${id}/`);
return data;
},
async getGenres(): Promise<string[]> {
const { data } = await api.get<string[]>("/books/genres/");
return data;
},
async getAuthors(): Promise<string[]> {
const { data } = await api.get<string[]>("/books/authors/");
return data;
},
async uploadEBook(
file: File,
title: string,