Author books API: use a single query with result and count
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
|
||||
let data = ref(null);
|
||||
let error = ref(null);
|
||||
let errorFetchTotal = ref(null);
|
||||
|
||||
const pageTotal = computed(() => {
|
||||
let countValue = (data.value !== null) ? data.value['count'] : 0;
|
||||
@@ -33,7 +32,6 @@
|
||||
getSearchBooks(data, error, searchTerm, lang, limit, offset.value);
|
||||
} else if (authorId != null) {
|
||||
getAuthorBooks(data, error, authorId, limit, offset.value);
|
||||
getCountAuthorBooks(totalBooksData, errorFetchTotal, searchTerm);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user