User book API: use a single query with result and count
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user