mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Make sure to fetch all system data on load
This commit is contained in:
@@ -22,7 +22,7 @@ export const useCollectionsStore = createStore({
|
||||
},
|
||||
actions: {
|
||||
async hydrate() {
|
||||
const response = await api.get(`/collections`);
|
||||
const response = await api.get(`/collections`, { params: { limit: -1 } });
|
||||
|
||||
const collections: CollectionRaw[] = response.data.data;
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ export const useFieldsStore = createStore({
|
||||
}),
|
||||
actions: {
|
||||
async hydrate() {
|
||||
const fieldsResponse = await api.get(`/fields`);
|
||||
const fieldsResponse = await api.get(`/fields`, { params: { limit: -1 } });
|
||||
|
||||
const fields: FieldRaw[] = fieldsResponse.data.data;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ export const usePermissionsStore = createStore({
|
||||
}),
|
||||
actions: {
|
||||
async hydrate() {
|
||||
const response = await api.get('/permissions/me');
|
||||
const response = await api.get('/permissions/me', { params: { limit: -1 } });
|
||||
|
||||
this.state.permissions = response.data.data.map((rawPermission: any) => {
|
||||
if (rawPermission.permissions) {
|
||||
|
||||
@@ -109,6 +109,7 @@ export const usePresetsStore = createStore({
|
||||
api.get(`/presets`, {
|
||||
params: {
|
||||
'filter[user][_eq]': id,
|
||||
limit: -1,
|
||||
},
|
||||
}),
|
||||
// All role saved bookmarks and presets
|
||||
@@ -116,6 +117,7 @@ export const usePresetsStore = createStore({
|
||||
params: {
|
||||
'filter[role][_eq]': role.id,
|
||||
'filter[user][_null]': true,
|
||||
limit: -1,
|
||||
},
|
||||
}),
|
||||
// All global saved bookmarks and presets
|
||||
@@ -123,6 +125,7 @@ export const usePresetsStore = createStore({
|
||||
params: {
|
||||
'filter[role][_null]': true,
|
||||
'filter[user][_null]': true,
|
||||
limit: -1,
|
||||
},
|
||||
}),
|
||||
]);
|
||||
|
||||
@@ -10,8 +10,7 @@ export const useRelationsStore = createStore({
|
||||
}),
|
||||
actions: {
|
||||
async hydrate() {
|
||||
const response = await api.get(`/relations`);
|
||||
|
||||
const response = await api.get(`/relations`, { params: { limit: -1 } });
|
||||
this.state.relations = response.data.data;
|
||||
},
|
||||
async dehydrate() {
|
||||
|
||||
@@ -33,7 +33,7 @@ export const useServerStore = createStore({
|
||||
}),
|
||||
actions: {
|
||||
async hydrate() {
|
||||
const response = await api.get(`/server/info`);
|
||||
const response = await api.get(`/server/info`, { params: { limit: -1 } });
|
||||
this.state.info = response.data.data;
|
||||
},
|
||||
dehydrate() {
|
||||
|
||||
Reference in New Issue
Block a user