Add author books list

This commit is contained in:
2025-11-25 18:11:27 +01:00
parent 624dfe0faa
commit 9ea7ef2e50
9 changed files with 233 additions and 19 deletions

View File

@@ -45,6 +45,15 @@ export function getAuthor(data, error, id) {
return useFetch(data, error, baseUrl + '/author/' + id);
}
export function getAuthorBooks(data, error, id, limit, offset) {
const queryParams = new URLSearchParams({limit: limit, offset: offset});
return useFetch(data, error, baseUrl + '/author/' + id + "/books" + "?" + queryParams.toString());
}
export function getCountAuthorBooks(data, error, id) {
return useFetch(data, error, baseUrl + '/author/' + id + "/books" + '/count');
}
export function getBook(data, error, id) {
return useFetch(data, error, baseUrl + '/book/' + id);
}