User book API: use a single query with result and count

This commit is contained in:
2026-01-25 00:42:50 +01:00
parent cd2b8a93bb
commit 8584e95ef7
15 changed files with 63 additions and 161 deletions

View File

@@ -28,10 +28,6 @@ function useFetch(data, error, url) {
}
}
export function getCountMyBooks(data, error, arg) {
return useFetch(data, error, baseUrl + '/mybooks/' + arg + "/count");
}
export function getMyBooks(data, error, arg, limit, offset) {
const queryParams = new URLSearchParams({limit: limit, offset: offset});
return useFetch(data, error, baseUrl + '/mybooks/' + arg + "?" + queryParams.toString());