mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Update dependency axios to v0.22.0 (#8483)
* Update dependency axios to v0.22.0 * Fix shared type * Use any type in axios * Adjust for axios type breaking change Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
@@ -181,7 +181,7 @@ export function useItems(collection: Ref<string | null>, query: Query, fetchOnIn
|
||||
fieldsToFetch = fieldsToFetch.filter((field) => field.startsWith('$') === false);
|
||||
|
||||
try {
|
||||
const response = await api.get(endpoint.value, {
|
||||
const response = await api.get<any>(endpoint.value, {
|
||||
params: {
|
||||
limit: limit.value,
|
||||
fields: fieldsToFetch,
|
||||
@@ -231,7 +231,7 @@ export function useItems(collection: Ref<string | null>, query: Query, fetchOnIn
|
||||
async function getItemCount() {
|
||||
if (!primaryKeyField.value || !endpoint.value) return;
|
||||
|
||||
const response = await api.get(endpoint.value, {
|
||||
const response = await api.get<any>(endpoint.value, {
|
||||
params: {
|
||||
limit: 0,
|
||||
fields: primaryKeyField.value.field,
|
||||
@@ -241,8 +241,8 @@ export function useItems(collection: Ref<string | null>, query: Query, fetchOnIn
|
||||
},
|
||||
});
|
||||
|
||||
totalCount.value = response.data.meta.total_count;
|
||||
itemCount.value = response.data.meta.filter_count;
|
||||
totalCount.value = response.data.meta!.total_count!;
|
||||
itemCount.value = response.data.meta!.filter_count!;
|
||||
}
|
||||
|
||||
function reset() {
|
||||
|
||||
Reference in New Issue
Block a user